Planet ILUG

February 08, 2010
Donncha O'Caoimh: WP Super Cache 0.9.9

Well, the new WP Super Cache is available now.

This release adds experimental object cache support. Don’t go looking for it unless you have an external object cache already. It won’t show up. I recommend using the Memcached object cache.

Some of the other major changes include more translations: Chinese (Pseric), Ukranian (Vitaly) and Japanese (Tai). The Italian and Japanese translations have since been updated but not included in 0.9.9. You can grab them from the languages directory if you don’t want to wait until the next release.

If you have WordPress Mobile Edition installed the plugin will grab the list of mobile user agents from that and warn if your .htaccess is outdated.

And, a small but significant change is that the PHP cache loader will use the static “super” cache if necessary. This might happen if your rewrite rules aren’t working properly and not serving cache files. At least your anonymous visitors will see some sort of cached file. Use the debugging system built into the plugin to determine where the cache comes from.

See the changelog for the complete list of changes.

Related Posts

(February 08, 2010 06:14 PM)

February 04, 2010
Donncha O'Caoimh: Matt Mullenweg and Craig Newmark
Matt and Craig

I was in Dublin yesterday to see Matt and Craig become Honorary Patrons of The University Philosophical Society in Trinity College. It was a low key informal event with many students and a few staff in attendance.

Eamon Leonard, of Echo Libre, kindly used my Flip Mino to record the Q&A session that followed. I want to express my gratitude to him for doing a fine job, especially as I saw him switch the camera from arm to arm during the hour long event. It wasn’t easy holding the camera aloft for so long. I’m currently transcoding the video and trying to make it smaller before uploading it.
I’ll add it to this post later, you won’t want to miss it!

Update! Matt was interviewed by Silicon Republic earlier today. Catch up on what’s happening at the Web Summit in Dublin by following #dws2 on Twitter.

Related Posts

(February 04, 2010 01:18 PM)

Dave Airlie: video of GPU switching
Here's a really badly shot video of GPU switching in action ;-0 - whiteouts are mostly be logging out and in ;-)

(February 04, 2010 02:16 AM)

February 03, 2010
Caolan McNamara: DEV300_m71

DEV300_m71, svx, soltools and accessibility all 0 unused methods now. ucb reportdesign and sal nearly unused free. sc and sw creep up again. Over all count -17

(February 03, 2010 08:45 PM)

Dave Airlie: hybrid graphics : the story continues (part 3)
v6 of the patch + another patch which needs some work before I can merge it are available now.

This mainly cleans up the patch architecture a lot and allow for Matthew to put his nvidia code in easier hopefully. Its moves the ATPX specific code to the radeon driver.

The second patch is from an experiment that I videod on a webcam but am now failing to upload, I'll probably get a better video tomorrow, the lighting was fairly bad for it today.

It basically allows for a delayed gpu switch ( it changes the debugfs API ), and allows gpu drivers to block the switch.

The switch file now takes ON/OFF like always, but the PCI IDs input is gone. There are 4 commands

IGD - try and switch now to the integrated device - can fail if drm drivers block it (mainly if X has the device open)
DIS - try and switch now to the discrete device - can fail if drm drivers block it (X again).
DIGD - try a delayed switch to integrated device
DDIS - try a delayed switch to discrete device.

So with X running you can echo DDIS to the file and log off X, it'll then switch as soon as X closes the drm device, and when
gdm restarts X it'll be running on the discrete GPU. If we had a shiny GUI on top of this it'd be as close as MacOSX can do it.
When you select to do a delayed switch we power up the other GPU straight away so the switch is quicker.

It needs more debugging, some open issues include:

after a few switches it can die on its ass
powering up the Intel glitches the display even when running the AMD
there may be race conditions in the patch, probably need a mutex around device open + this stuff
suspend/resume - since we D3 the card, if you do an s/r cycle it'll resume it, we need a flag in the
driver to say its powered off by the mux and to ignore s/r cycles - I've started adding this to radeon.

mjg59 has access to an nvidia laptop and is looking closely at how to make that all work.

(February 03, 2010 07:07 AM)

February 02, 2010
Dave Airlie: hybrid graphics on Linux (Part 2)
Okay v4 of the patch is available at

http://people.freedesktop.org/~airlied/vgaswitcheroo/
http://people.freedesktop.org/~airlied/vgaswitcheroo/0001-vga_switcheroo-initial-implementation-v4.patch

First thing I added was power up/down methods. This calls the DRM suspend/resume methods + along with the cut power for discrete GPU. I'm not sure dynamic Windows ever does this as it seems to take a bit of work, I suspect they just run the second GPU in really low power modes. This is slow because we have to repost the ATI card after turning it back on.

I then talked to mjg59 and worked over the ATPX detection. I removed all the DMI code and it should detect *any* laptop that uses ATPX (i.e. ATI/ATI and Intel/ATI) from what I can see. I've tested on Lenovo W500 and T500 now and it appears to work on both. Would be nice if someone on a ATI/ATI and/or ASUS ATI/ATI or ATI/Intel machines could give it a whirl. I think the main problem with ATI/ATI is the poweroff methods have a hardcoded Intel PCI ID. I've no idea yet how to tell on an ATI/ATI which device is the IGD and which is discrete. Its probably more than likely the IGD is the one with the ATPX method on it.

It doesn't switch off at boot yet but I've added commands to let you do it.

echo "OFF" > switch - turns off the not in use card, so if Intel and ATI are on at boot, it will turn off ATI
echo "ON" > switch - turns back on not in use card
echo "PCIID" > switch - causes a switch with full off/on cycles.

nvidia combos appear to use a DSM method and in theory nouveau_acpi.c should be detecting that, so it might be possible for someone to hook that up.

I've also started looking at some desktop integration via gdm or logout - but its not my usual place to code so going is a bit slower ;-)

(February 02, 2010 05:49 AM)

February 01, 2010
Kae Verens: CMS Design using PHP and jQuery

I’m happy this week. Last week, I spent some time and organised myself a bit more. In work, things are going smoothly – managed to get over a tricky piece of work and the rest is simply a list of small tasks.

For the last few weeks, I’ve been emailing and messaging Darshana at Packt Publishing, about writing a second book (jQuery 1.3 with PHP is going very well – list of reviews).

I initially wanted to write about file management, to explain how KFM works, and to help force me to improve on it. But there’s just not enough of an interested market in that – it’s too specialised.

So instead, I’ll be writing about CMS design using PHP and jQuery.

We (webworks.ie) have a CMS engine which we’ve written and improved for the last 6 or so years. We’ve open-sourced it a number of times, but never managed to generate much interest in it. We never had the time to spend on publicising it.

The book will not be specifically about that engine, but rather about the concepts that went into creating it – how a CMS works, how to manage plugins, administration, user management, and all the other little bits and pieces that every PHP developer needs to eventually address.

By way of explanation, I will be demonstrating various parts of our CMS, and explaining how and why it was built that way. I will be closely examining the other major CMSes as well, and giving alternative methods where good ones exist.

The proposed chapter list is:

  1. Introduction
  2. CMS core design
  3. User management and access control
  4. Page creation and Navigation
  5. Template Management
  6. Plugins
  7. Form creation
  8. Image Gallery
  9. Panels
  10. Search and Polls
  11. RSS and News
  12. Online Store
  13. Products

I’m really excited about this project!

(February 01, 2010 10:55 AM)

Dave Airlie: hybrid graphics on Linux
So someone thought it would be a good idea to make laptops with two graphics chips in them and switch betweem them to save power.

Now other OSes support this to varying degrees, I think XP + MacOSX require a logout cycle and Vista/Win7 can dynamically switch while running, while Linux basically falls over in a heap.

So I sat down today with a Lenovo W500 which has an Intel GM45 and AMD Radeon 3650 Mobility in it, and I wrote a patch to try and get closer to the XP/MacOSX level.

The result of one days straight hacking is at:
http://people.freedesktop.org/~airlied/vgaswitcheroo/

The patch is totally focused on the Lenovo W500, other switchers will need to add stuff to this codebase.

So what works?
Boot in switchable graphics - which boots with intel and radeon turned on
KMS drivers load for radeon and intel, radeon BIOS stored in start of VRAM (driver hacked to read it)
bind to both drivers + fbs for both.
mount debugfs - cat /sys/kernel/debug/vgaswitcheroo/switch
2
0 :0000:01:00.0
1+:0000:00:02.0
shows the 02.0 (intel) device is in charge of the MUX.
goto runlevel 5, play with X under the Intel driver, goto runlevel 3 kill X
at fbcon echo "0000:01:00.0" > /sys/kernel/debug/vgaswitcheroo/switch
barely glitches console and switches
goto runlevel 5, play with X under the ATI driver, goto runlevel 3 kill X
echo "0000:00:02.0" > /sys/kernel/debug/vgaswitcheroo/switch
goto runlevel 5, play with X under intel again.
wash and repeat.

What does it do?
So far its just switching the MUX using the ACPI method and remapping all the console to the other framebuffer device,
it also reset the bits that denotes which devices is the boot vga device which X uses to pick the primary GPU. This
means X doesn't need an xorg.conf to switch. (I think all those patches are in upstream X server).

What does it not do?
It doesn't powerdown the radeon when its not in use yet. I know the ACPI call to power it off/on, and since I have
the BIOS I should be able to repost it. So I'll try adding the callbacks into the KMS driver to do this soon.
It doesn't poewrdown the intel when its not in use yet. Not sure what I can do here, since there is no ACPI method to turn
it off. I think I can just D3 the GPU, and use the normal s/r paths to bring it back. Again requires more investigation.
The whole what ACPI + methods map to what device, how the mux ids match etc will probably all need to be stored in the DMI table.
Anything not a Lenovo W500 - probably not that hard to add other Intel/AMD variants to this, add DMI and mux switching method.
nouveau isn't hooked up - this could probably be done by some interested party - the driver hooks so far aren't very hard.
No idea about ATI/ATI or NV/NV ones either.

I'm really hoping interested community people can make this actually useful to them on other hw, I won't have permanent access to the W500 to keep this all tested in the future.

Can we do dynamic switch without restarting X?
No. X needs a lot of work, a lot more than the day it took to hack the kernel.

How do we go forward?
We probably need to add gdm support to move this forward. A logout button that is "Switch GPU", that gdm kills the X server,
then hits the switch port and starts a new X server. I'll try and talk to some gdm hackers over the next few days.
I'll try and push this into a git tree against Linus current, and we can add tested patches for other machines as they go in.
Also the DMI section is only imaginary of what I think others might need, we might have to rip it all out. Also I've no idea
if there are ACPI methods to query the switchable modes etc.

(February 01, 2010 09:03 AM)

January 27, 2010
Donncha O'Caoimh: WP Super Cache with Object Cache support

Here’s a quick post to encourage brave testers. I’m adding object cache support to WP Super Cache so you’ll be able to store your cached files in a memcached backend instead of disk.

It’s not complete but it’s running on this blog and well, you’re reading this which means it’s doing something and not breaking! If you want to give it a go grab the development version from the download page.

There are few caveats, but three spring to mind:

If you don’t know what memcached is, or how to set it up then you probably don’t want to test this. If you do, use Google and find out about them. Unfortunately I don’t have time to explain how to install it.

Inspiration and some code taken from batcache, the excellent caching plugin we use on WordPress.com.

Update! I updated the Changelog in the readme.txt and I’m looking for testers. Here’s what’s new in the development version:

* Added experimental object cache support.
* Added Chinese(Traditional) translation by Pseric.
* Added FAQ on WP-Cache vs Supercache files.
* Use Supercache file if WP-Cache file not found. Useful if mod_rewrite rules are broken or not working.
* Get mobile browser list from WP Mobile Edition if found. Warn user if .htaccess out of date.
* Make sure writer lock is unlocked after writing cache files.
* Added link to developer docs in readme.
* Added Ukranian translation by Vitaly Mylo.
* Added Upgrade Notice section to readme.
* Warn if zlib compression in PHP is enabled.
* Added compression troubleshooting answer. Props Vladimir (http://blog.sjinks.pro/)
* Added Japanese translation by Tai (http://tekapo.com/)
* Updated Italian translation.

The biggest changes are the addition of the object cache and a small change to the php code that serves cached wp-cache files. If the mod_rewrite rules on your site don’t work for whatever reason the plugin will look for the Supercache file and serve that instead. An extra header is added to the served page when this happens. It’s all in the readme.txt!

Related Posts

(January 27, 2010 04:02 PM)

Kae Verens: what’s up!

Short run-down of what I’m doing lately: nothing.

Less short: I’m trying to get work out the door, get a good run at some personal projects, pass grade 2 piano, get organised, and generally improve my lot.

None of this is working. I think the “get organised” bit is the most important, as it will help the rest of it fall into place.

I usually only post about web-development-related topics here, as that’s the only subject where I feel I can contribute something new and interesting, so I tend to not talk about other stuff. But sometimes, rattling off the current state of the head is good for clearing it.

In work, I can’t really complain – we have a number of largish projects which are slowly creeping towards completion. The hardest thing about them is getting information from the clients, and then a week or two later being told that half the information is not required. I guess my main complaint at work is the inexorably slow completion rate.

On the personal projects side:

There are still a number of small bugs in KFM 1.4, and either I don’t have the time to get to them, or there is no enough information to recreate the bug and the submitter doesn’t give me access to their copy so I can’t see it from their side.

KFM 2 has been halted for a while – the idea is huge, but I simply don’t have the time, and no-one is clambering for it. I’ll get to it when I have time, but I might have to approach it by evolving KFM 1.x into meeting what I wanted, instead of the original goal of building KFM 2 from scratch.

I started a new project, OddJobs4Locals two weeks back, and got a good two-day run at it, then time got ahead of me again. I think this will be a good one, when I can complete it. Useful for students, people with a little spare time, or simply people that just want to make a little extra cash. Not yet working, but it will be soon, I hope… This is doubly interesting to me, as it is done purely through AJAX, so it will be easy to do a smart-phone client or a desktop client when the time comes.

I’m in the back/forth stage of working with Packt publishing to see if they want me to do a second book (the first one has no bad reviews at all). We’ve mostly agreed on a table of contents, and I’m just trying to get the time to combine a few of the smaller chapters together.

On the piano, I’ve been ready for the grade 2 exam since November, and am still waiting to see if there will be an exam near me any time soon – I hate the effort that goes into travelling (I have a family, and no car). I was hoping to do a grade every 6 months. It looks like this might not be possible, despite me being ready for it… The tunes I’m doing for it are Beethoven’s Sonatina in G Major, a waltz by Bela Bartok, and Boys And Girls Come Out To Samba, by Terence Greaves – by the way, I don’t like those videos; there are no dynamics in any of them, and I can hear a number of mistakes as well. No video apparently of the Terence Greaves one.

As for organisation… well I guess I’d better start working with Mantis again.

My lot will have to wait – I’ve a load of work to get done before it can improve.

Meh. Depression taking hold again.

(January 27, 2010 09:35 AM)

January 25, 2010
Justin Mason: Links for 2010-01-25

(January 25, 2010 11:05 PM)

January 22, 2010
Dave Airlie: LCA 2010 talk
So I originally was going to attend LCA 2010 for the week, but real life interjected and I couldn't abandon family commitments for that long, so I ended up doing a crazy cross-Tasman dash. As well as the change in flights, Isabel came down with a virus and Gia also got it, I think I got a milder version of it, but they both seem alright by the time I left but I had little sleep the previous two nights.

So I flew on Wednesday morning, got in Wed afternoon, met up with ppl, had a couple of beers, wrote slides, slept, finished slides, went to Thur morning, drugged myself up on Nurofen Plus to combat viral effects, gave my talk, went to see ajax talk, went to professional network dinner, went for beers with ajax + benh (listening to an American and a Frenchman speaking about wine while listening to drum n bass in a Wellington pub was a bit wierd). Decided to push on through, so got back to room at 3am or so, checked out/left for airport at 4:20am, flew at 6:20am, into BNE at 7am, home, bed, sleep for a few hours and mind Isabel for afternoon.

So my talk was "So you've put kernel graphics drivers in the kernel... what next? can I haz ponies?". My slide deck is off the 0-content style + lots of pictures of various ponies, which I've found, they'll be on the LCA site soon and I'll upload them when I plug that laptop in again.

(a) stop people reading ahead of your bullet points so they don't doze off while you are catching up
(b) gives them something to look at apart from me while they actually have to listen to me :-P

It seemed well received, the room was pretty packed out (ppl standing/sitting - LCA schedulers you listening?) and I don't think the sickness or lack of decent preparation made a big difference. I'd like to apologise for not even mentioning SGX/poulsbo, I'm not sure how but it totally slipped my mind, but the situation hasn't really changed in terms of how screwed it is.

(January 22, 2010 03:18 AM)

January 21, 2010
Caolan McNamara: DEV300_m70

DEV300_m70 callcatcher results show four new unused methods arising out of the (cool) new printing changes.

(January 21, 2010 05:49 PM)

January 18, 2010
Donncha O'Caoimh: WordPress MU 2.9.1.1

one dot one dot one dot one dot dot dot…. Yes, last week’s release of WordPress MU wasn’t to be the last one. This is. Really.

WordPress MU 2.9.1.1 fixes #1193 and #1195, two annoying but one liner bugs that crept into the last release.

This is also a security release fixing a bug in the installer that has existed for quite some time. If you can’t update yet, delete the file index-install.php immediately. That file is only used when you install WordPress MU for the first time so it’s not needed afterwards. Don’t ask, “I’m using version x.x.x, do I need to delete this file?” Just do it. Thanks Mad Sprat for reporting the problem.
The index-install.php in 2.9.1.1 is safe, but I’ve added a note at the end of the install recommending the file be removed. The file is not used after installation and it’s always a good idea to clean up unused scripts.

Get WordPress MU 2.9.1.1 on the download page or wait until your Dashboard upgrader finds the new release.
If you’re adventurous, download and replace the following files on your site to upgrade:

  1. index-install.php
  2. wp-admin/includes/mu.php
  3. xmlrpc.php
  4. wp-includes/version.php

Sorry Jeffro! :)

Related Posts

(January 18, 2010 06:15 PM)

January 17, 2010
Ken Guest: PEAR metapackage for Statusnet

A short while ago, someone popped into the PEAR irc channel on efnet and asked about installing Statusnet – which is a “open source micro messaging platform that helps you share and connect in real-time within your own domain.” It’s what powers identi.ca and similar micro-blogging services.

Specifically, this person wanted advice on installing the six or so PEAR packages on which this software depends; eight if you include the optional ones.

Foreseeing a number of people wanting similar help, I thought it would be best to create a metapackage to bundle these PEAR packages together – at the least it would mean only one “pear install” command would be required and it would reduce the number of potential mistakes that could be made.

Following my own instructions in the “Dependency Tracking (Meta Packages) with PEAR” section in the PEAR documentation, I quickly came up with Statusnet_Statusnet-0.1.1.tgz.

Install it via “$pear install http://short.ie/statusnettgz” for the moment – as the location of where it’s being hosted may change during the week.

(January 17, 2010 11:55 PM)

January 14, 2010
Donncha O'Caoimh: WordPress MU 2.9.1

WordPress MU version 2.9.1 has just been released.

This is probably the last release before it is merged into WordPress 3.0 as the merge has already started!

Anyway this release brings the new features and bug fixes of WordPress 2.9 and 2.9.1 into WordPress MU. My favourite new feature has to be the Trash can, but there’s also an image editor, plugins can be bulk updated and video embeds are easier to do.
If you have more than a few dozen blogs, be sure to add the commentmeta table first before upgrade.

Thank you to everyone who has helped make WordPress MU better over the years, either by helping on the forums, writing plugins, contributing code, working on Trac tickets or any of the other hundred and one other things that go into an open source project.

Related Posts

(January 14, 2010 01:20 PM)

January 13, 2010
Donncha O'Caoimh: WPMU: Please add commentmeta first

I was going to announce WordPress MU 2.9.1 today but I knew that people would run into trouble with the missing commentmeta table if they didn’t upgrade their blogs immediately.

So, download add-commentmeta.txt, rename it to add-commentmeta.php and copy it into your mu-plugins folder. Login to your site as a Site Admin, visit Site Admin->Upgrade and upgrade all the blogs on your site. Make sure you’re using WordPress MU 2.8.6 as the upgrade script in older versions may not execute the plugin.

The script above will add the commentmeta table to each blog. Give it time because it will take quite a while on large sites. WordPress MU 2.9.1 tomorrow.

Related Posts

(January 13, 2010 05:43 PM)

January 08, 2010
Caolan McNamara: DEV300_m68/DEV300_m69

callcatcher results for DEV300_m68 and DEV300_m69

Down to 864 unused methods, unused svx mostly moved into new cui lib. svtools split into svl happily removed all unused svtools methods, leaving svtools unused-free. (x86_64) bridges also unused methods free as well.

sd now accounts for 25% of all low-hanging fat

(January 08, 2010 08:18 PM)

Donncha O'Caoimh: Some people don’t feel the cold

The weather reading on my desktop computer says -3C, that’s the temperature at the local airport I presume. It’s very cold out, but the sun is out and at least there’s no wind.

I took Oscar for a walk, I’m all wrapped up against the cold with a thick warm hat and over that a hoodie (yes, they do have a use!) and finally a light jacket to keep all the heat in. I dodged the ice and enjoyed the lovely sunlight melting away the frost on exposed surfaces. The footpath wasn’t too bad, Oscar was enjoying himself.

Half way down the road I bump into a neighbour. He’s dressed for a totally different season! Apart from his usual black jeans, he had on a nice shirt, but the top two buttons were undone exposing flesh to the cruel winter cold, and his one concession to that cold was a light black jacket, not closed of course. He hurried past, commenting that, “the sun is very bright this morning isn’t it?”

Amazing.

Related Posts

(January 08, 2010 10:54 AM)

January 07, 2010
Kae Verens: win a copy of jQuery 1.3 With PHP

I’ve just noticed that a site is running a competition to give away a copy of my book.

competition page

All you need to do is leave a comment explaining how you intend to use jQuery in your next project.

If you want to see reviews of the book, I’m maintaining a list of reviews here.

(January 07, 2010 11:16 AM)

January 05, 2010
Donncha O'Caoimh: WordPress MU 2.9.1 RC

WordPress MU 2.9.1 is almost ready but we need people to test it before the final release. This will be the final release before we start merging into WordPress so I’d love to get as many bugs as possible ironed out. Take a quick look at the tickets in Trac and see if you can fix any!

Check out revision 2044 or to get the latest code get it from trunk instead. If you’re not comfortable with Subversion access, there’s a zip file at the end of each page.

Only try this on a test server of course! The new version creates a new “commentmeta” table on each blog after you upgrade. That could be intensive on large sites. Ron points towards John’s script that adds those tables. I haven’t tried it yet (it’s a job for tomorrow!) but it’s definitely a good idea to create this table on all your blogs before you upgrade. Let me know how it goes.

Related Posts

(January 05, 2010 09:44 PM)

January 04, 2010
Aidan Delaney: Eight years (really!) since MiNDS>

As an undergrad I was quite active in the NUI Maynooth IT society. We called it MiNDS>. Though These days it’s written as Minds. I have a soft spot for Rowan Nairn’s original site design and logo featuring that angular bracket. To my surprise I was recently contacted by some guy wanting to talk to MiNDS>. I think he was flogging SEO, however I pointed him at the committee email address. I don’t run MiNDS> anymore. But I did write a small paragraph on why the committee may not reply to him on the subject of SEO. It makes for good reading as to the personal accomplishments of several alumni.

“Many of our past members are the technical plumbers for both the Google and Amazon Irish operations. At least one of our alumnus works in the PowerSet team that develops an engine that Microsoft are integrating with Bing. Furthermore, several other alumni members have completed PhDs in the area of heterogeneous distributed searching and sorting and several others own web development and SEO firms. We’re bursting at the seams with high-quality talent.”

And that’s just from the people I know about. I’m getting all teary eyed thinking about days in the Union, modding Athlons into MPs and general mayhem. Someone should write an official history. Maybe I can meet Mags for a coffee some day and get the story about the founding. I was at the meeting that she took over from the postgrads (or I believe I was) but I don’t remember the whole story.

(January 04, 2010 08:05 PM)

January 03, 2010
Colm MacCarthaigh: Holy Orders

So, yesterday marked the day that the new Blasphemy law came into force in Ireland. It also marked the day when Atheist Ireland published 25 “blasphemous” quotes, in a supposed act of defiance.

Atheist Ireland have gone about it in a very strange way; the url in their blog post is not a hyperlink, and the quotes aren’t simply in their post or on their front page. That’s their prerogative, of course, but I do wonder if it’s a sign of overt caution. Either way, the circus seems to have worked, and CNN and the BBC have both picked it up, among many more.

As a press-stunt, it’s genius. Getting the attention of the international media like that is not easy, and through careful choice of celebrities to quote, and the right tone, Atheist Ireland have pulled off a well-executed PR coup.

But as an act of online advocacy, and of affecting political change, frankly it’s stupid. And I think that Atheist Ireland will have approximately zero success. Such is the magnitude of their “not getting it” that they are probably forever doomed to an existence of committeeism and tokenism in near-equal measure.

Firstly, the action itself is ineffective, it does not – in my opinion – constitute any kind of an offence. Let’s go to the source, the 2009 Defamation Act;

(2) For the purposes of this section, a person publishes or utters blasphemous matter if—

(a) he or she publishes or utters matter that is grossly abusive or insulting in relation to matters held sacred by any religion, thereby causing outrage among a substantial number of the adherents of that religion, and

(b) he or she intends, by the publication or utterance of the matter concerned, to cause such outrage.

(3) It shall be a defence to proceedings for an offence under this section for the defendant to prove that a reasonable person would find genuine literary, artistic, political, scientific, or academic value in the matter to which the offence relates.

Clearly there is political, scientific and academic value in Atheist Ireland’s statements. If they really wanted to engage in civil disobedience, it would take something akin to cartoons of the prophet, getting it on in a threesome with Buddha and Jesus while being bitten by some vampire Jehova’s Witnesses. That’s what the law was designed to impede. To be clear, I don’t agree with that law, I think freedom of speech is more important than a bizarre right not to be offended, but the law simply isn’t of the nature that Atheist Ireland and others imply.

I’m not sure if it’s willful misrepresentation, but by conveying the impression that the new law is designed to outlaw such trivial, and relatively innocuous, statements of the sort that Atheist Ireland quotes it is only serving to undermine Atheist Ireland’s own credibility. In light of the actual facts, it’s hard to take them seriously on the issue. Sacrificing integrity and accuracy for punchy-PR is never a great idea, long term.

To be fair to Atheist Ireland, they don’t actually claim that their statements are prosecutable, and are making the broader (but again, tokenistic) point that the law is simply silly and unworkable. Great, that’s an important point – but what use is making so much noise about it? This actually entrenches politicians and makes them less and less likely to respond favourably. It’s ironic that this the kind of reactionary “we must be listened to” tokenism that led to the law in the first place.

PR-led advocacy groups, which are really pressure groups almost never work in Ireland. There simply isn’t any political incentive to respond to pressure on these kind of issues. Across all of Ireland there are maybe 200 swing votes on the Blasphemy issue, thinly spread across the constituencies. Elected politicians, rightly, place it very low on the agenda. Going to 2 funerals, fixing some lamps, and changing a speed limit or two will get you as many votes – and in one parish.

Real, successful, advocacy groups don’t look like this. Instead there are small, targeted and strategic efforts. It’s lots of small meetings, tactically-directed briefs and letters and relationship building. The effective groups work somewhat within the system, more quietly, and get a lot more done. Groups like Barnardos get more mileage from lobbying the Department of Finance behind the scenes than they do out of a hundred press releases.

When we were running our campaigns against E-voting, I’m convinced we made ten times as much progress by working quietly behind the scenes than we ever did through PR-based activity. In order to run a successful effort, I think it’s important to keep some basics in mind;

Bottom line; always judge an advocacy group by the amount of actual progress they make on their issues, not column inches. And if you are an advocacy group, ask at every stage – for every action – “what is the sequence of events I hope to trigger that will actually cause the change I desire?”.

Now, to be more constructive. What would I do? Firstly, I think the priority should be to convert all of the PR into money, and to use that money to fund legal research. Small, but targeted academic briefs – aiming for 3 or more papers a year establishing the jurisprudence of the blasphemy law. The aim would be to establish a credible context in which it showed that the law is out of place, that it doesn’t fit with many of our international treaty commitments and is comparatively regressive.

Next priority would be to start to frame the issue as anti-republican. Ireland is at a very important cross-roads, in the wake of the Ryan and Murphy reports there are calls for more church-state separation. The way to capitalise on this is to make the case for a newly invigorated Republicanism, one of the great Irish political ideals. Republics are supposed to be by and for the people, relatively free of church interference. Our proclamation says;

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.

It’s not that hard to frame the blasphemy law as anti-republican.

With a few short years of that kind of hard work, it would be possible to create a context in which an Irish politician could see it as in their interest, and in the betterment of their legacy, that they bravely spear-head a new Republican ideal.

Backed by research and briefs which will help them not look stupid to their peer-group, or in the face of opposition questions, we can give them the confidence to propose it in the first place. This is what achieving real change looks like; careful groundwork. The system simply isn’t going to respond whining from a marginalised minority group.

The good news is that it’s doable. It took us a long time to get it finished, but a relatively small group of e-voting campaigners finally managed to get a key government policy 100% reversed. And this was in spite of far more political (and real economic) capital having been invested than in the new blasphemy law. There were many many small meetings, letters, briefing documents, ghost-written speeches and editorials, researched papers, legal strategies and only about 2 press releases per year on average – with a cluster around 2004 during the run up to the elections.

To me, based on experience with ICTE and other lobby groups, that’s a lot more like what this kind of successful advocacy looks like. I do hope Atheist Ireland, or another secular-interest group, can find the time and experience to develop these issues properly, but for now it doesn’t seem promising.

Update: Throwing caution to the wind, Atheist Ireland have now made the url I mentioned a hyperlink and published the quotes on their front page. Also, there’s some lively discussion in the comments to this post.

(January 03, 2010 03:14 PM)

January 01, 2010
Kae Verens: blasphemy!

“Jesus is the only son of God, and if you don’t follow him, you will not be getting through the gates into Heaven”.

Anything wrong with that? Yes – it’s blasphemous, to just about every religion on Earth which is not Christian.

And so, Dermot Ahern, in his infinite wisdom, has just made the central tenet of the religion of one third of the entire planet illegal.

Well done, sir. Fucking genius idea, that.

How about this one then – “Jesus is not the son of God”. Now I’m blaspheming against Christianity.

There’s absolutely no way to win against this except to be completely silent and never discuss what you believe with anyone at all. And that means it wasn’t just Christianity that the idiot has made illegal to speak about, but all religions.

By the way, I’m an atheist. I believe in thinking about what is “true”, and in discussing it with people that are interested, and in not pushing my own beliefs on others.

I hear the door knocking – the thought police are here to take me away. Pray for me…

(January 01, 2010 11:27 PM)

December 31, 2009
Donncha O'Caoimh: First game of 2010?

In years gone by I used to worry about the first game I’d play in the new year. When I say “years gone by”, I really mean it. This was around the time when Ikari Warriors and Armalyte were only a few years old, and I was a teenager pounding out ASM code on a C64 keyboard with an Action Replay.

Time passed and the PC rose to become the dominant gaming platform and with it my interest in games waned. Sporadic bouts of play included almost all the ID games and the original Half Life but as I had to reboot into Windows it was never going to last. In recent times I became the owner of my first two games consoles. First a Nintendo Wii (gathering dust in the living room) and an Xbox 360 this year that awoke in me the dormant games playing interest that had been killed off a dozen years ago.

So, this year I’m once again pondering what game will become that first one. Will it be the obvious choice of Modern Warfare 2? Or perhaps a bit of COD 4? Maybe even Batman: Arkham Asylum?

No, I think the first game of the teenies (or whatever we’ll call ‘em) will be Trials HD. A kick ass game I already wrote about and couldn’t stop playing even after hitting the restart button a few dozen times!

What about you?

Related Posts

(December 31, 2009 10:38 PM)

December 28, 2009
Colm MacCarthaigh: Point Break

So, about 2 minutes after taking this photo;

Hot!

I slipped on the paraffin-laden solid granite pavement, everything went flying, and I ended up getting a very different kind of photo entirely;

That’s my right arm, and somewhere in there a minimally-deforming radial fracture that I don’t remotely have the training to actually see. Though I definitely don’t like the look of that suspiciously lumpy bit of bone. Here’s another look;

As fractures go, I think I got the best kind. It’s now 3 weeks later and I’m almost back to a full range of movement and strength is starting to return. I can write, type, take photos and most importantly, play music once again. The people at St. James’s Hospital have been very good, and if you ever plan to break anything I can recommend doing it near them.

Science is really really cool. Randomised control trials have shown that a simple millennia-old sling (not a cast) is the best treatment, so that’s what I got. About a century of rigourous bio-chemical engineering has led to little pills I could buy in a pharmacy that magically suppress complex sources of pain with minimal side-effects.

Over that same century we’ve progressed from a naive understanding of “Röntgen radiation” as mysterious emanations from a vacuum tube, to a complex quantum-mechanical model of X-Ray interactions that allows us to record these highly-ionising photon jet-streams on a semi-conductor, convert the impression into a digital image and then have it pop up on my clinicians desktop. Right now, reading a random blog on the internet, you can see inside my body – as easily as you might look out the window.

And social science is used too. Because people frequently forget their appointments, there are text message reminders; a few days, and one day before anything that’s scheduled. Again, a trial has shown that this is both cost-effective and clinically beneficial. And when I go to the physio-therapy clinic, I get given a simple set of tried and tested exercises that have been shown to lead to improvements.

Cooler still is that despite all of the science, and care and attention involved in the whole process – really it’s the body doing the work. Through some magic – mostly unknown – system of DNA signaling, controlled protein unfolding, stem-cells and “stuff”, tiny microscopic organic “bits” somehow communicate and coordinate the building of whole new bone, mostly in the right place. So without having to do all that much, I can play Fussball and write dumb blog entries again.

It’s almost worth doing just for the experience.

(December 28, 2009 09:12 PM)

Kae Verens: multiple file uploads using HTML5

As a response to a reported bug where Chrome was taking ages to load up a flash multiple-file uploader, I’ve updated KFM to use HTML5’s multiple-file input box where possible.

To do this, first create the element:

  var input=document.createElement('input');
  input.type='file'; // use old-style JavaScript method to make sure all browsers respect it
  input.name='kfm_file';

Notice that we’re not using setAttribute to set the type and name – that’s a DOM method which works in most browsers but not (of course…) in Internet Explorer 6, where it has bugs.

And now, we tell the input to use the multiple-upload method. We use .setAttribute in this case because we only expect newer browsers to succeed with it.

  input.setAttribute('multiple','multiple');
  if(input.multiple)input.name='kfm_file[]';

In the second line, we check to see if the element is now marked as a multiple-uploader (most current browsers will not succeed in this), and if it does, then rename the input element by adding a [] to the end. If this is not done, then the server will only see the first file which is uploaded.

That’s the client-side done. This will only be visible in newer browsers such as Chrome, Safari 4, Firefox 3.6. I expect Internet Explorer will eventually catch up by 2020 or so.

If you’re doing this in pure HTML, then I suppose this would be good enough for you:

<input type="file" multiple="multiple" name="file[]" />

In this case, you must put the [] in the name in all cases.

On the server-side, you need to write your upload receiver to expect either a single element, or an array.

For some really goddamned stupid reason, when multiple files are uploaded to PHP, the results are interlaced in a really crappy and awkward manner (I don’t like it).

Instead of something logical and easy to use, like this:

array(
  [0] => array(
    'name' => 'file1.txt',
    'tmp_name' => '/tmp/abcdef'
    ....
  ),
  [1] => array(
    'name' => 'file2.txt',
    'tmp_name' => '/tmp/ghijkl'
    ....
  )
);

You get this…

array(
  'name' => array(
    [0] => 'file1.txt',
    [1] => 'file2.txt'
  ),
  'tmp_name' => array(
    [0] => '/tmp/abcdef',
    [1] => '/tmp/ghijkl'
  ),
  ...
);

While that looks at first glance to be easy to use, it’s not. You can’t do a simple “foreach($_FILES['kfm_file'] as $file)” and expect the above to be usable at all…

So, the first thing I do, is to check for the $_FILES['kfm_file'], and convert it into the first form above, which is very easy to work with:

$files=array();
$fdata=$_FILES['kfm_file'];
if(is_array($fdata['name'])){
 for($i=0;$i<count($fdata['name']);++$i){
  $files[]=array(
   'name'    =>$fdata['name'][$i],
   'tmp_name'=>$fdata['tmp_name'][$i],
  );
 }
}
else $files[]=$fdata;

In my own case, I’m only interested in the name and tmp_name variables, so that’s all I set up.

Now you can do a foreach on $files and treat them all individually.

foreach($files as $file){
  // uploaded location of file is $file['tmp_name']
  // original filename of file is $file['file']
}

If you want to see this in KFM, have a look at the nightly-updated demo tomorrow, or download from SVN right now.

oh – and buy my book!

(December 28, 2009 04:37 PM)

December 26, 2009
Donncha O'Caoimh: My Christmas Day Adventure

Today was a Christmas Day my family won’t forget for a long time! We had a great time today, heard some amazing news, and then had a bit of an adventure on the way home. The weather has been pretty cold for the last while, the county was covered in a sheet of ice but this afternoon temperatures rose slightly which was great because we were due to visit family for Christmas dinner.

My brother Donal and his wife had ice problems this morning when their car slid out of his estate. Two hours later they got underway when the roads thawed out a bit. That had worried me because there’s a hill into our estate too.

After a great day with family, a delicious dinner made by my brother-in-law Chris and a visit to my own family we returned home, sharing the road with nervous drivers and reckless drivers. The journey home was uneventful but the hill into our estate proved to be troublesome. The road was covered in ice and slush and as we rounded the bend a car slid down backwards and eventually braked and turned back down. I tried to drive us up there too but the car only got so far before wheels started to spin, the car shuddered and we weren’t going forward any more. Kinda scary!

I had to turn back of course, we parked further up the road where I spotted a break in the ditch. In the freezing dark I managed to get up there, and to make what is turning into a long story shorter enlisted the help of our neighbours who were in the same boat. Between us we managed to get the essential bags out of the car, I carried Adam up the road, and we took a short cut through Rosy and Con’s house knocking a good 100m off our journey.

I used the light of my Nokia 5800 in video mode to light the way so I have a record of all that happened, even if it’s more audio than anything else! Must have a listen tomorrow.

Anyway, I’m glad to be home, safe and sound. We’ll get the car tomorrow. Thanks neighbours for your help. Nollaig Shona dhaoibh go leir!

Related Posts

(December 26, 2009 12:02 AM)

December 22, 2009
Donncha O'Caoimh: Kontrol Freek FPS Freek review
FPSFREEK

The FPS Freek by Kontrol Freek is a small attachment for the Xbox 360 or PS3 controller that helps players aim more precisely in first person shooters or FPS games. There’s a Speed attachment too for racing games.

The FPS Freek snaps on to the top of the controller sticks so your thumbs have to physically move further to make the same in-game movement. This is supposed to help when you want to make small accurate movements, especially useful when aiming at a small distant figures in a shooter such as Modern Warfare 2. From the blurb on the product page,

The added analog stick length provides 40% more linear distance from full stop to stop. This gives you more leverage and increased precision without disturbing your natural gaming playing feel.

I’ve been using it for a week and while my gaming has improved a whole lot, it was improving any way because I was getting better with practice. I don’t think you’re going to see a dramatic improvement in your gaming by using the FPS Freek.
I tried increasing the sensitivity of the controller, thinking that the extra leverage of the thumbstick would help but it really didn’t, and I think it’s back at 3 in MW2 now. At that sensitivity I can aim fairly well. With a silenced Scar-H I was able to make a few kills at the other side of Highrise, but on the other hand, a distant crouched enemy-in-waiting in Estate shot me while I attempted to aim at him.

The FPS Freek is comfortable to use however. It probably has helped my gaming but it’s not the major leap you might think. Learning how to use a mouse and keyboard properly was better for my gaming than using this, but of course you can’t use a mouse and keyboard on the Xbox 360. All you PC gamers will know what I mean!

In the US it costs $10 but here in Ireland or over in the UK you have to buy it from Lime. I think it cost me the equivalent of US$29 including (for some reason) registered postage of about 7 Pounds Sterling. I had to sign for it when it was delivered. At that price it’s not great value for money, but at $10 it’s an impulse buy I could live with.

In theory the science is sound. The extra length of the stick will give you more travel and room to aim precisely but if you’re not a good gamer this won’t work miracles. If you panic when you’re confronted by an enemy on a map, you’ll still do that. If you don’t use a game’s maps to your advantage now, then buying this won’t magically make you immune to enemy fire. It may help you aim if you’re sniping. I’m still using the FPS Freek on my right thumbstick however, it’s comfortable.

Buy it only if you have $10 burning a hole in your PayPal account. Don’t buy it if you’re outside the US, it’s not worth it.

Just don’t expect miracles.

Just so you know I haven’t a clue what I’m talking about, here’s a few glowing reviews:


Short video review of the FPS Freek


Impressive accuracy at custom sensitivity 7 in COD 4, but then this guy is hardly a newbie at the game!

Related Posts

(December 22, 2009 10:48 PM)

December 17, 2009
Kae Verens: novelrank

Because it’s difficult to know exactly how well my book is doing, I went looking for online apps that might be able to help.

I came across NovelRank a few weeks ago, which keeps track of your Amazon SalesRank and uses the fluctuations in the value to try figure out when a sale happens.

At first I was a bit disappointed, as my own ratings should not many sales going on, but I realised that this was because there were no reviews out there so people a) didn’t know about the book, and b) didn’t know if it was worth buying.

Since the reviews have started coming in, sales have picked up, as can be seen in the NovelRank graph for my book.

I like this application – it’s a simple idea, and the author has made it freely available (I assume he makes money from affiliate links).

Want to see it in action? Buy JQuery 1.3 with PHP and then view NovelRank graph for my book the graph a few hours later to see your very own blip appear on it.

It’s interesting to see that the book is not selling at all in Canada. What’s wrong with you Canadians?? ;-)

On a very related note, I’m in talks with Packt to produce another book. More on this later when details are more concrete.

(December 17, 2009 02:00 PM)

Dave Airlie: radeontool 1.6.0 released
I've just done a 1.6.0 release of radeontool from my personal repo, it contains both
radeontool and avivotool, and is probably full of ugly but whats in distros now is older
and worse.

radeontool (and avivotool) are lowlevel tools to tweak register and dump state on radeon
GPUs, they also can parse parts of the BIOS data tables.

Tarballs are at
http://people.freedesktop.org/~airlied/radeontool/

git://people.freedesktop.org/~airlied/radeontool.git

(December 17, 2009 05:22 AM)

December 16, 2009
Colm MacCarthaigh: Con-science

I’m sitting on a train, the Enterprise, moving along at about 140 kilometers per hour between Drogheda and Dublin. Something is causing practically every particle in my body to spark into a new life at a different position in space one instant to the next.

Dancing and spinning

For each one of those particles, there’s some chance it could just pop into life on the far side of the moon, or even the universe. But something, I guess “motion” is averaging everything out and look, there the sum of me pops, every tiny instant getting slightly closer to Dublin.

If the train was in the vaccuum of space – or somehow free from the effects of friction – it wouldn’t even take anything to keep this atomic leap-frogging going. Each small micro-part of me would just keep on dancing. And somehow at the same time, it’s exactly as if I were staying still all along – there’s no real difference. This has been tested.

But if for any reason a change of tempo was required, to move from a waltz to a samba, something intangible and ephemeral – mysteriously lumped into the word “energy” – is required. It’s weird and mystical and it doesn’t make a whole lot of sense, but it can be measured and described – and relied upon.

And as I sit here and write, using the word “I” like that, it feels like there’s a “me”. It seems as if there’s a real sense of ownership over my thinking, I can’t tell where my thoughts come from, but they are mine.

I feel like I’m free to choose things, when I get off of the train I could get straight into a taxi or walk to a tram. I don’t know which I’ll do yet, there are a lot of factors to consider, but neither choice seems pre-ordained, and once it happens it will feel like “I” owned that choice.

“Free will” seems as real to me as the forward motion of this train, it’s an inexplicable dance, but it’s my tune. And that makes less sense. Reality is describable by all of these symbols and equations, and we can make predictions with them. This has been tested.

There are even divisions between what is predictable in detail, and what is predictable only in the aggregate, random and unknowable at the finer grain.

Here in my head, it doesn’t seem like my thoughts are predictable, or could be. If they are just an inevitable cadence, then that “I” is merely an illusion. It also doesn’t seem like thoughts are random or unknowable, to me anyway. I have patterns of thinking, recurring themes, and a detectable personality. It can’t be the same dance.

How many miracles are there on this train? Motion is miraculous enough, that “I” can think, that the universe even exists seems miraculous too. But most astonishing, is that these simple realities are seemingly contradictory.

I’m still on that train, I haven’t gone anywhere, there haven’t been any angels visiting me, or deitious interventions. These thoughts haven’t led anyone to complicated dogmas, wars or ceremonies. Some say science is cold. Maybe the dance is a myth.

And if this mental dance should one day just end, where are the real love-songs? Songs that speak to the real meaning, the genuine warmth, of spending a fleeting, passing, bittersweet whirl around the floor with someone. Not an infinitesimal slice of eternity living in hope of a better dance; that’s cold. This has been tested.

(December 16, 2009 05:43 PM)

Donncha O'Caoimh: Fill and span DVD archives with Discspan

I have a huge archive of photos. I shoot tens of thousands of photos every year. Storage requirements for all those photos was bad enough when I shot in Jpeg but then I switched to RAW and space usage jumped! Here’s what the last 3 years looks like:

169GB of data is a lot of stuff to store. Originally I had them all duplicated on two external drives but then I bought a 500GB internal drive for my laptop for speedier access. Unfortunately that drive simply wasn’t big enough. I need to convert some of my RAW files to Jpeg to save space. To preserve the original RAW files I want to archive them somewhere permanently. I have a DVD writer so that was an obvious choice.

Burning data to lots of DVDs is tiresome. You can use tar, zip or another archiver to split the data but then you have to run through all the DVDs to pick out a file to restore. I like having the files directly accessible but that means endless selecting files, making sure they’re as close to the DVD size as possible, burning them, moving on to the next bunch. In the bad old DOS days I had a program to fill floppy disks if you pointed it at a directory but I’ve spent years searching for a similar Linux script. Last week I found one.

Enter Discspan. My 2007 archive was already burned to DVD, and I wish I had this script while doing it. I’ve burned my 2008 archive with Discspan and it was a doddle. Point it at the right directory, feed it some details about the DVD drive and let it go. 26 DVDs later and my 2008 archive is safe on DVD!

The script scans the directory, figures out how many DVDs are required and it fills each DVD with data, spanning my digital archive over multiple DVDs.

Be aware when using it that you should let Linux detect the next blank DVD before pressing return. The first time I ran it the script bombed out when growisofs didn’t see media to write to. You also need to patch it because it doesn’t detect the right size of DVD+R’s but it’s a simple one-liner.

Another Linux project, Brasero promises to span disks too but it didn’t for me. It’s the default CD/DVD burner in Ubuntu now and it’s a shame this functionality is broken in it.

Hopefully Brasero will be fixed for the next release. I’d offer to help but my C/C++ is very rusty.

Related Posts

(December 16, 2009 10:26 AM)

December 15, 2009
Ken Guest: A response to “Better Postal/Zip Code Validation Method for CakePHP 1.2″

Just a few minutes ago I read Jamie Nay’s A Better Postal/Zip Code Validation Method for CakePHP 1.2 blog post.

Jamie says that “The Validation::postal() method that comes with CakePHP 1.2 is good in that it can handle a number of different country formats, but the problem is you can only validate your data against one country. What if you want to accept, say, either Canadian or US postal/zip code formats? I ran into this problem earlier today, and decided to write my own postal() function that can take either a string as the country, just like Validation::postal(), or an array of countries.”

I’m probably going to have to wait for Jamie to wake up before my comment on that blog-post is approved, but the crux of it is “Don’t”. Don’t write your own code to validate user input, unless of course the input data is specific to a problem domain that others haven’t catered for yet.

I drew attention to two things. The first is that there are Validation packages in PEAR, including the main Validate class and all the Validate_xx subclasses such as Validate_US, Validate_CA and some 22 others).

The second item I drew Jamie’s attention to is that his validation code counts a zip code of “00000″ as valid, when the USPS zip code look up tool correctly (and they should know!) identifies that code as invalid.

Why spend time writing and debugging regular expressions, compiling lists of valid data and so on when other people have already done this work? Especially when it comes down to such things as validating data input which is crucial when you need to guard against cross site scripting vulnerabilities.

Focus on what you need to do rather than reimplementing what others have already done.

Honestly, this probably should be subtitled – “Stop the NIH craziness, please” – though to be fair Jamie might not have known of the solutions already out there.

(December 15, 2009 01:59 PM)

December 13, 2009
Ken Guest: Book Review: jQuery 1.3 with PHP

jQuery 1.3 with PHP

jQuery 1.3 with PHP

Before I start this review proper, I need to disclose one nugget of information first: The author, Kae Verens, and I are both currently serving as members of the Irish PHP Users Group Committee and have known each other for quite a few years. If you believe I can remain impartial and objective (as I hope you do – because I am), read on:

This is the first book sent to me from Packt where I wasn’t left dizzy from trying to understand just what it is the author was trying to get across. It looks like their proof-reader was awake for this one – totally awesome.

jQuery, as the vast majority of us already know, is a JavaScript library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. In other words it does all the heavy lifting and takes care of cross-browser compatibility issues so you don’t have to and thus allows you to focus on the work that you need to do without all those distractions.

“jQuery 1.3 with PHP” is aimed “for PHP application developers who want to improve their user interfaces through jQuery’s capabilities and responsiveness”. Over the course of ten chapters Verens starts the off with an introduction, then a series of ‘Quick Tricks’ that almost immediately help you add some measure of “Web 2.0″ functionality to what I’d term a “web 0.2 application” rather sharply.
The book ends with a chapter on Optimization – some of which you are bound to already know and some which are complete gems.

In the middle are chapters with mini-projects on tabs and accordians, forms and form validation, file management, calendars (and how to make your own google-calendar-like application), image manipulation, drag and drop and data tables.
In each case, projects are analysed and the required steps for each are outlined in the simplest terms – no extraneous buzzwords are used or are the projects over-analysed for the sake of pedantry.

I was a little surprised in some places where, for example, the json encoded output was not created via json_encode; but then thought not everyone is going to have PHP 5.2 or greater installed. Thumb forward a few pages and this is mentioned. So all’s o k.

It was good to see Kae suggesting use of the PEAR Validate package (or similar) in the Forms and Forms Validation chapter (chapter 4). I had to wonder if there was a PEAR package for creating and shunting down jQuery validation rules to the client – and found that there isn’t. That’s something to consider for later on, I guess.

The rest of the book is similarly both easy to read and easy to understand – my first port of call for learning how to do something that I’d almost term exotic with jQuery and with PHP in the background is usually Google but that is going to change (actually it already has).

Honestly, I wouldn’t be surprised if this books working title was “JQuery and PHP: The HowTo” – it is that good.
Now, this book is not for learning jQuery – that is not within its remit, but I would heartily recomend “jQuery 1.3 with PHP” by Kae Verens to anyone wanting to utilise jQuery from a PHP background.

(December 13, 2009 11:46 PM)

Colm MacCarthaigh: Role Models

Consciously, I’ve never been keen on the idea of role-models. Thinking it synonymous with hero-worship, it has always seemed a bit of an anti-pattern to me. Why try to emulate anyone? There are enough people in the world behaving the same as someone else, being different and original is definitely more useful, even if it makes you a bit crazy. When I did a dubious “leadership style” test I came up as “anti-follower”, so maybe it’s just another form of contrarianism on my part.

Over time, I’ve found that the best way to learn is by example, even if it’s a process of unconscious osmosis. And when I’ve spent time on what is sometimes called “personal development” I’ve found that there is real benefit in reading the biographies and the writings of truly awesome people. It certainly seems more productive than reading self-help books that are written in truisms and marketing crap.

I thought I’d share some of the people who I’ve really benefited from reading about, truly amazing people.

Richard P. Feynman

RPF is a legend; a nobel laureate physicist with an uncanny ability to explain complex ideas, an anti-authoritarian maverick who loved to screw with officialdom but most of all an incredibly generous, warm, loving guy (even if a womaniser at times). His writings on physics and his letters to his first, dying, wife are an inspiration.

Robert M. Pirsig

Pirsig, someone genuinely crazy enough to have been institutionalised, still managed to write one of the best sellers of the 20th century and to invent a philosophical system that many consider to have merit. ZMM is amazingly well written, all the more so when you consider that every paragraph was planned out in advance on index cards. Worrying, his narrator in ZMM is the only literary character I’ve ever strongly identified with.

Grace Hopper

Grace Hopper signed up for the US navy during World War 2, and rose (primarily as a reservist) to the rank of commodore/rear-admiral back when this was incredibly unusual. But more than this, she was an excellent experimenter, and kept a rigourous lab-book, despite being mainly a computer scientist. She was a strong believer in getting things done, and coined the phrases “dare to do” and “It’s easier to ask forgiveness than it is to get permission”. Seriously awesome woman. Oh yeah, and she invented the compiler.

Doc Watson

Doc Watson has been blind nearly his entire life, but that doesn’t stop him from being the truly most amazing guitar picker the world has ever seen, or doing crazy things like mending the tiles on his roof. His solo runs and accompaniment are incredibly good, and he’s somehow maintained humility in the face of multiple grammy awards and playing for the president on a regular basis. Another doer, he just kept going and became more productive after the tragic death of his duet partner and son Merle.

Dolly Parton

Dolly is a self-described mis-fit, but she is also a very very shrewd business woman as well as being a dedicated humanitarian and gifted songwriter. She is one of the really great singers, and is emotionally invested in every song she sings (even the ones that sound like bubblegum, listen to how sad she is in “Here you come again”).

CP Snow

CP Snow was basically a troll, but a very very good one. His arguments, lectures and writings weren’t always rigourous and balanced but they were always enlightening, thought-provoking and forward thinking. Most famously he identified the tension between literary and scientific cultures and made a great case for the unfair treatment of science. A scientist and a well-regarded author CP Snow is a great example that it is possible to straddle both worlds.

Peter Watson

Peter Watson is a prolific researcher and writer, the volume of his output and the breadth of his knowledge is unfathomable. I’m constantly reading something of his. He has methodically and thoroughly condensed practically all of known intellectual history, writing about all of the inventions of the human mind. His writing is great, but it also brings home how relatively ordinary our time in history really is, yet serves as a great reminder that so many things we take for granted even had to be invented.

No doubt I’ll think of more now that I’ve put a list together. I’ve been fortunate enough to meet some of these people, but I’ve also been even more fortunate in that other people I’ve come across in my life have served as role models (starting naturally enough with my parents). I don’t intend this post as meme, but if you have role-models, I’d be interested in hearing about them. As I mentioned, it’s definitely a great benefit to read about such inspiring people.

(December 13, 2009 08:24 PM)

Kae Verens: jQuery 1.3 With PHP; buy it!

Christmas is coming, as most of us (especially parents and people that have wallets) know, so it’s time for ye all to dig deep and buy the perfect gift for that favourite web developer in your life.

Not knowing what that perfect gift could possibly be, I’ll recommend instead that you invest in a copy of my book, JQuery 1.3 with PHP.

Reviews are just starting to come in. I only know of two on-line ones so far, my favourite of which is this one:

The author does a great job of introducing complicated theories and breaking them down into manageable steps, whilst always taking very thorough considerations for applying jQuery knowledge into CMS ’s and web applications.

I noticed that the same reviewer posted this on Twitter: thoroughly impressed with reading jQuery 1.3 with PHP. writing a review on it, will be available soon!

The other one that I’m aware of is more of a list of notes than a review. The only thing he says in general about the book is “Overall a good book.”

There are a few minor criticisms in the second review that I don’t agree with – that I didn’t use inline functions in all cases, didn’t use Google’s functions to load jQuery from its CDN, and used document.getElementById in some cases instead of using jQuery’s $ function.

My reaction to those points are: inline functions are explained later in the book as I didn’t want to throw the reader head-first into understanding them, there’s no point in loading three libraries (google, jquery and jquery-ui) when you only need jquery and jquery-ui, and for the purposes of getting an element by its ID, document.getElementByID is much quicker than $.

I think the real problem with my decisions with the above points is that, after having had them pointed out as mistakes, I feel I should really have explained more clearly in the book why I chose to do things in those ways in the first place. Well, that’s something for edition 2 :-D

So far, though, the reactions are positive, and I hope this continues – there haven’t been any “this is crap” reviews so far, which is good.

I know of a few other people that are writing reviews, and can’t wait to see them. So reviewers, please do criticise it – it makes the end-product better.

And christmas shoppers, it’s a great book ;-)

(December 13, 2009 05:35 PM)

Donncha O'Caoimh: Modern Warfare (Reflex) on the Wii

I was shocked and amazed when I saw the boxes of Call of Duty Modern Warfare in the Wii section of Gamestop the other day so I went searching for reviews. Metacritic gave it it a reasonable 77, while the following two Youtube reviews rate it very highly. Graphics look awful, and aren’t a patch on the Xbox 360 or PS3 version but the Wii remote makes aiming easier and more precise.

I loved Call of Duty WAW on the Wii, I’m tempted to dust down the machine for this too…

Just added it to my Amazon Wishlist.

Related Posts

I was shocked and amazed when I saw the boxes of Call of Duty Modern Warfare in the Wii section of Gamestop the other day so I went searching for reviews. Metacritic gave it it a reasonable 77, while the following two Youtube reviews rate it very highly. Graphics look awful, and aren&#8217;t a patch [...]

(December 13, 2009 01:15 PM)

December 08, 2009
Donncha O'Caoimh: No more wireless, I’ve gone wirefull!

Everyone else goes wireless with radio waves buzzing through the air and I return to good old ethernet cables and a switch. Today a package came from Amazon containing the D-Link DHP-303/B Powerline 200Mbps and a 5 port switch (and an internal drive to replace the tiny one in my Dell laptop but that’s another story).

The D-Link Powerline product is actually two plugs that are inserted into your wall sockets and use the wires in your house to communicate. I was a little dubious about it working well but it’s been fine. One plug is downstairs by the DSL router, and the other is upstairs here in my office. They apparently talk at 200Mbps but I’d take that with a grain of salt. My computers talk at 100Mbps, as does the switch so I presume that’s the limiting speed. It’s plenty fast enough for my DSL but I’ll have to try a file transfer later.

For the last few years I used WiFi to bridge the gap between downstairs and upstairs but this works just as well, and file transfers between computers aren’t as dog slow as they were using wireless networking. Wifi was never as fast as it should have been, probably because the signal was weakened by:

  1. Travelling through a wooden telephone desk in the hall
  2. Travelling diagonally up the stairs
  3. Going through an internal wall with a CD shelf behind it
  4. and finally finding the antenna of my Linux laptop buried inside my desk

No chance eh? I once tried to force the connection to be 54Mbps but it failed half the time, the Xbox wouldn’t connect. It just didn’t work well. Oh, and sometimes, the cordless phone ringing downstairs knocked me offline! Didn’t matter what channel I was on.

Sheesh, I’m getting very old school. I changed back to Apache from Nginx last weekend, changed from P2 to a more traditional WordPress theme this morning, and then dumped wireless networking this afternoon. I hear vinyl records are making a come back.

I will plug in the wifi router again, for those moments when I want to work from the kitchen. Unless I get another D-Link powerline adaptor..

Related Posts

(December 08, 2009 04:45 PM)

Donncha O'Caoimh: Sitewide Tags 0.4 for WordPress MU

If you use the Sitewide Tags plugin for WordPress MU you may have missed Ron’s announcement post about the new release.

This version is all Ron’s doing. He merged in features he has worked on over the past year. Check out his blog post for the full list of changes.

Oh yeah, I’m doing mini-merges of WordPress and MU code all the time. Update from trunk (svn link) if you want to try it out, and please report any bugs on trac! I love the new trash feature!

Related Posts

(December 08, 2009 02:02 PM)

Barry O'Donovan: Installing FreeBSD on Soekris net4801-48

Nick introduced me to Soekris a few weeks ago and some neat little boxes they make. For a current project, the net4801 fit the bill perfectly, especially with the add in vpn1411 which off loads the intensive computational operations for encryption and compression.

I plan some future posts looking at the throughput performance of OpenVPN with and without the vpn1411 as well as general traffic throughput measurements. This post however will focus on installing FreeBSD on this device as easily as possible.

Firstly, I ordered the following:

Including P&P, this all came to €369.48.

While there is a lot of documentation online and a number of methods available to install FreeBSD on a Soekris box, I found that the easiest way to to do it was as if I were installing on the local machine and hence I could just install it as normal. For this, we turn to VirtualBox1.

  1. Install VirtualBox if you don’t have it.
  2. Attach the CF card to your computer via the USB card reader.
  3. Download a FreeBSD installation CD (e.g. 8.0-RELEASE-i386-disc1.iso.
  4. Create a new VirtualBox machine such that:
    • the ISO image is mounted;
    • you have enabled a network adapter (PCnet-PCI II in bridged mode works for me as I have a DHCP server on the LAN).
  5. Boot the new VirtualBox machine and from its built in BIOS, choose to boot from the mounted CD ROM.
  6. Immediately attach the USB card reader device to the VirtualBox machine.
  7. Choose a custom install so you can select the USB device as the destination medium (da0 for me).
  8. Proceed with your FreeBSD installation as normal.

Once it completes, there are some changes you should make before popping the CF card back into the Soekris box:

  1. In /etc/rc.conf, set up the network configuration. Note that in VirtualBox, the interfaces will be reported as le0 but when booted on the Soekris box, they’ll be sis0 through sis2. I set sis0 (marked Eth 0 on the case) to configure by DHCP. I also set a static IP on sis2 so I can access the box on a direct computer to computer connection if necessary. Lastly, I enable the SSH daemon (ensure you have created a user!):
    ifconfig_sis0="DHCP"
    ifconfig_sis2="inet 192.168.130.2 netmask 255.255.255.0 up"
    sshd_enable="YES"
    
  2. When installing via VirtualBox, the destination device was a USB drive. On the Soekris, the CF is handled as an IDE drive. As such, change fstab to something like (as appropriate for you – I have a single root filesystem and a swap partition):
    # Device                Mountpoint      FStype  Options         Dump    Pass#
    /dev/ad0s1b             none            swap    sw              0       0
    /dev/ad0s1a             /               ufs     rw              1       1
    
  3. Enable a console on the serial port in /etc/ttys by editing the ttyu0 line:
    ttyu0   "/usr/libexec/getty std.9600"   vt100   on secure
    
  4. Lastly, add the following lines to /boot/loader.conf:
    comconsole_speed="9600"
    console="comconsole"
    

Now, pop the CF card back into the Soekris box and boot with the serial console attached (19200,8,n,1). I immediately changed the Soekris console speed to 9600 so that it works seemlessly from Soekris BIOS to FreeBSD bootloader, kernel and console.

1. VirtualBox is a fantastic piece of software. I run Kubuntu natively on my laptop and I have a virtual Windows 7 Professional machine running in VirtualBox most of the time. It runs smoothly and quickly and there is a wonderful feature to allow you to attach USB devices to the virtual machine (so my iPhone can access iTunes for example).

(December 08, 2009 11:53 AM)

December 07, 2009
Kae Verens: php.ie slowly upgrading

It’s been a while since I wrote anything vaguely technical. I guess it’s because I like to write only when there’s something new to say, and usually only if I have some new code to give away.

No new code today, but I can describe the recent work on php.ie (I’m the secretary of the Irish PHP Users’ Group).

So firstly, it was basically a static/brochure site for about a year, until we installed WebME (written by me!) as the CMS and created a skin for it so there’s only a tiny design difference. If you want to try out WebME, then download the SVN version from the google code site, or create a test site here (uses a really old version of WebME – you’re better off using the SVN version).

Then, I started rewriting the right panel. Beforehand, it displayed recent twitter messages, but they’re not often put out so it was a bit of a wasted space.

The panel now uses a WebME widget which displays recent Twitter messages, emails from the mailing list, and posts from the forum.

Over the next few days, I’ll be adding a new News section to the site, and the message widget will be able to show new articles from planet php.ie and new jobs from the jobs page.

I’m currently reading through Ken’s linux.ie todo list to see what I can appropriate for php.ie for its ongoing development.

Big thanks go to Michele and the team at blacknight for hosting the site.

Oh! Just a reminder, buy my book! JQuery 1.3 with PHP – hasn’t been reviewed by anyone yet, as far as I know, but my own opinion is that it is worth having on your shelf if you are a PHP developer that wants to step into jQuery.

(December 07, 2009 09:49 PM)

Donncha O'Caoimh: Cork Floods

A round up of a few videos and photos of the flooding in Cork last month.

Cork Flood 60
Photo by David Hegarty

Panciostela drove from Victoria Cross up the Carrigrohane Straight to Windsor Motors and posted 3 videos along the way, shooting the flood in the Kingsley Hotel last. Any vehicles in the underground carpark there must have been completely destroyed.

Lots of photos on Flickr and pix.ie (floods around the country), there’s even a Submerged Cork Flickr Group. Brian Clayton posted some outstanding photos of the floods on his blog.

Thanks to Margaret Jordan where I saw one of the videos above and prompted me to post this.

Links: Will has blogged about the various fundraising activities for the people displaced and affected by the floods, West Cork Wash out!, Flood in Cork, North Main Street.

I forgot to say, I was in town on Saturday and there was hardly any sign of the flood and the city was very busy!

Related Posts

A round up of a few videos and photos of the flooding in Cork last month. Photo by David Hegarty Panciostela drove from Victoria Cross up the Carrigrohane Straight to Windsor Motors and posted 3 videos along the way, shooting the flood in the Kingsley Hotel last. Any vehicles in the underground carpark there must have [...]

(December 07, 2009 10:42 AM)

Dave Airlie: early Xmas present - Intel SSD arrived
So the attendee's gift at Kernel Summit this year was an Intel X-25M 80G SSD. However as they had only just launched while we were at Kernel Summit, Intel couldn't get supplies to give them away.

So I a package today and lo and behold its got my SSD in it!!

So I've no real idea what I'm going to do with it, I have no laptop useful enough to support such a thing, so I've put it
into my desktop in the office for now. I suppose I can migrate all my git trees to it.

Any suggestions for what I should store on it? time for a new laptop sometime next year I suppose :-)

[update- lots of sugggestions to use it for my root partition, however my desktop machine boots rarely and has 6GB
of RAM, so it keeps gcc/firefox/openoffice in cache most of the time. So I suspect I really should use it for
my git trees where I spend a lot of time checking out and merging trees]

(December 07, 2009 06:11 AM)

December 03, 2009
Dave Airlie: qemu vmware + vmwgfx
So just as an aside to radeon stuff, I spent an hour or two today on a break playing with qemu's vmware gfx + VMware's new vmwgfx kms driver.

I've managed to get it as far as showing me the console which was good,

http://people.freedesktop.org/~airlied/scratch/vmwgfx-qemu-hacks.patch

is the hacks against git://git.freedesktop.org/git/mesa/vmwgfx.git

the first hack looks like a bug in qemu, really it should expose a second PCI bar with the FIFO in it according to the VMware SVGA specification.

the second looks like a possible bug in vmwgfx if no irq is advertised from the device, which in this case there isn't,
vmwgfx gets a capability bit for having an IRQ from what I can see.

third looks like it should be necessary, but I'd need to read the vmware svga spec a bit more, without it, we get the
wrong fb size.

the fourth looks like a bug in qemu confusing depth and bpp, bpp can be 32, but depth is generally 24.

I'm not sure what I'll be doing further on it, it was just a neat afternoon hack I meant to try for a while

(December 03, 2009 06:12 AM)

December 02, 2009
Donncha O'Caoimh: Could this be the last huge WP into MU code merge?

Well, this might be one of the last times I do a huge WordPress MU merge! I’ve just finished merging the code from WordPress 2.9 beta 1 into WordPress MU trunk. No, I didn’t link to the actual merge changeset. That’s 2007 and huge! :)

Want to give it a go? Grab the zip file from here and install it on a test server. Do not, under any circumstances install it on your production server! Be aware that I haven’t tested most of the code yet so there may have been errors made during the merge.

We also need to work out a good way of adding the commentmeta table to each blog. If your MU site has more than a few dozen blogs you need to add this table before you upgrade. On WordPress.com, it took quite a long time to add that table to each of the millions of blogs there! It’s probably something that an external plugin should handle. It’ll have to be linked from the MU download page and hopefully talked about enough that nobody tries to upgrade without it. Ideas?

Oh, I’m testing out WordPress 2.9-beta-1 and changed theme here. I’m using a heavily modified version of P2. Love it so far. I’ve managed to hack it to do what I want. Noel did a great job with the theme.

Related Posts

(December 02, 2009 06:21 PM)

December 01, 2009
Caolan McNamara: DEV300_m66

DEV300_m66 callcatcher results, 877 unused methods, down 9. Mostly due to examining the jurt ones and re-categorizing them as JNI entry points.

(December 01, 2009 08:26 PM)

Caolan McNamara: howto port OOo to a new arch

I’ve added a brief overview of porting OOo to the OOo wiki based on the new Linux/HPPA port which is available in today’s DEV300_m66. Written from the perspective of a Linux port where most of the work is already done, good bit more to do for a non-Linux port, but maybe helpful anyway.

(December 01, 2009 02:35 PM)

Kae Verens: Graham Coxon at the Barbican

Bronwyn and myself went to the Barbican, London, on Saturday to watch Graham Coxon perform.

We both enjoyed the event. Bronwyn was excited to meet friends she had only spoken to online. Well, she’s been excited for the whole of the last week, but it’s all related!

London is big.

The weather was ok for the Friday and Saturday while we were wandering around taking in sights and sounds. We visited the National Gallery, and were handed a sheet saying a candle-lit baroque concert would be happening later, but it clashed with our previous plans.

Arrived at the Barbican. Bronwyn didn’t see any of her friends. We said we’d meet up around the bar, so that’s where we went, and sat opposite it.

We were there about five minutes when I spotted a huge amazing monstrosity of a drum-machine, Felix’s Machines. You have to see the videos of that thing!

As I stood there, Simon from Resigned (also the admin of the Graham Coxon forum) noticed me and waved to get my attention – ah, that’s where they are! We joined a group of Coxon fans.

We had two hours, so we gently infused ourselves thanks to the bar, with some opting for chips and complaining that you shouldn’t need to buy fish&chips just to get some chips (as a vegetarian, I agree wholeheartedly with this, and not just through a hatred of waste).

The show was to start at 8, so we headed down and got our seats.

Simon had thoughtfully gotten us row G (haha – G for Graham. very good. ahem…), which had a walk-space directly in front of us, meaning we could stretch our legs and walk to the toilets without stepping on people’s heads.

Bronwyn decided a new piece of policy was to be created henceforth: when purchasing tickets, people should be measured for height, and really tall people should be confined to the back of the auditorium.

The band came out and the place became loud with cheers.

The sound engineers didn’t do the best job in the world. The band played brilliantly apart from a few minor hiccups, but some of the sound problems were distracting.

When Graham spoke, it was difficult to hear. I was afraid that his singing would be the same, but when he sings, he crouches close to the microphone, and when he talks, it’s like he’s unaware the mic is there.

Some of the songs were technical, involving a lot of finger-picking. An example is Sorrow’s Army. Graham started out on that one, then Robyn Hitchcock joined in a few bars later. Robyn’s guitar, though, was louder, so it drowned out Graham’s playing. This was pointed out independently to me by Simon later on, so it wasn’t just my ears playing tricks.

There was a feedback problem later on at the beginning of one tune, which was quickly and cheerfully quelled and restarted.

One of the three female singers was very loud at points. I didn’t like that – it was like she was stealing the spotlight.

On the far left of the stage, Max Eastley was playing the Arc. At most points in the concert I couldn’t hear anything of what he was doing. Only in quiet songs with only one or two other instruments.

When the songs got loud, they got very loud. Graham was unintelligible at some points as he tried to sing above the sound of the other instruments.

Apart from these gripes (and they’re minor – Bronwyn doesn’t agree with any of the above points), I enjoyed the concert.

I think the only tune I didn’t like was the ending of Caspian Sea, where the band appeared to get stuck in a rut, repeating the same bar over and over and over.

I liked how the music was not perfectly in-tune or perfectly rhythmic, but was just a little off here and there. This gave the music a more natural and “used” feel, like an old rickety piano which is played when the pianist is surrounded by friends – you feel like he’s playing personally to you and it’s not a surgical procedure.

The concert was basically Graham’s latest album, The Spinning Top, with a few extra old songs played at the end.

One of the things I like about this album is the finger-picking. Graham has recently been trying to increase his finger-picking skills, inspired by his love of old blues and folk. His interest in Nick Drake really shines through in the singing, and Bert Jansch (of Pentangle) in the playing.

In a lot of the songs, there is not just one finger-picking “voice”, but two. This could be seen obviously at the concert where Graham was playing one finger-picking riff and Robyn was playing another, yet they meshed nicely.

Overall, I enjoyed this concert and if he does it again with another album, I’m sure we’ll be going over again.

(December 01, 2009 11:54 AM)

November 28, 2009
Kae Verens: resigned – the band

We were sent an invite to come see Resigned play (interesting name – does it mean “gave up”, or “was signed again”? I’ll ask them tomorrow) at the Water Rats Theatre.

Bronwyn commented, on seeing the dance-floor, that it was “very like Fibbers, except for the smell”. ;-) Fibbers (Parnell st) has a bit of a reputation – especially among those of us that have been frequenting the place more than 15 years.

I visited the toilet at one point there and can confirm that it out-fibbers’s fibbers. It was rank.

Having said that, the people that were there were eclectic. There were punks, industrials, grungers, rockers – hard to put a label on the place when everyone is so different!

Anyway – back to the band – I enjoyed it. I was expecting some hard punk, as “resigned” is a very serious name, but the music was actually quite interesting and not as harsh as I expected. There were interesting rhythms (listen to their track “Hangover”) that make you feel like you need to dance or at least admire it, and at no point did I feel they were copying anyone.

Their last track was dedicated to “someone in the audience”, and they played “Advert” by Blur. It was aimed at Bronwyn and a few other Coxon fans.

We spoke to Simon, Gary and John. The playing was perfect – no sign of effort from anyone; everything was “to a tee”. For example, while playing some tunes, I noticed Simon fiddling around with his effect pedals /at the same time/ as playing his part. Very cool. Not a beat dropped – I liked it.

John said that there was a bad gig a few weeks back where there wasn’t enough practice beforehand and it all fell apart, but it didn’t show tonight at all. Solid playing, and I’d love to see them play again.

We were handed a CD of their album which they refused to accept payment for, for reasons which agree almost with my own philosophy.

My belief is that people should be paid for what they do. Royalties are a bonus, but should not be considered as “earned”.

As an author of a book, this might fly in the face of reason, but the thing is – I wrote my book because I wanted to, and I enjoyed the act of its creation. Anything afterwards that I get paid is a bonus, but I don’t feel I’ve earned it (Yes, I’m very grateful for it (thank you!!), but I don’t feel I should demand people pay me if they accidently find my words online).

I suggested this to Simon, in the case that musicians should be paid for the gigs they play, and everything else is a bonus.

This appears to be the same model that large bands such as Nine Inch Nails and Radiohead are following recently – basically, it’s all free, but there’s really nothing that compares to seeing it live.

We haven’t gotten to listen to the CD yet, as this laptop does not have a CD drive, but I’m sure Bronwyn will have it on repeat for the next few weeks.

Well done, Resigned, on providing a very good night out, and we’ll talk to you tomorrow before Graham’s gig!

(November 28, 2009 02:52 AM)

November 26, 2009
Colm MacCarthaigh: Period Pain 3

As promised, though it’s been a while coming, I wrote that there’d be a followup on scheduling periodic tasks.

The most important point to get is that for nearly all real-world use cases the actual time that a “scheduled” task runs at doesn’t matter. Tasks that have to occur at a specific time on Tuesday are vanishingly rare. cron is one of the most abused tools going, rather than encode specific times it would make more sense to let a scheduler decide when the tasks should be run based on criteria such as overall network and system load.

It’s not even hard. There are plenty of scheduling algorithms and theory to borrow from, and many large organisations even have private implementations that let you be a bit more fuzzy about when tasks are run. But there’s another level to the periodicity problem that is worth thinking about.

Rather than simply using numbers and values that come readily to humans, it can be worth putting more effort and research into the values of periods themselves. This isn’t meant in some fetishistic sense . Yes, for say virus updates, it’s possible to produce a gigantic linear algebra equation, with 100s of parameters, that would balance the likelihood and cost of a security breach against the cost and frequency of checking for updates and it would come out with some answer, but that’s a lot of work for little gain.

More interesting, and more tractable, are the effects that arise when multiple periodic tasks coincide. These are really common in distributed systems, and a real pain to debug and diagnose.

It could be as simple as the case we’ve been looking at; a cron job that runs once a day, but across many systems, or it could be as complex as a full-blown peer to peer app that’s got a control loop with multiple peers, a supernode or two and a user-interface polling loop.

And a pattern that’s repeated over and over again is that people choose “convenient” values for the periods .. and these choices are so common that when the periods end up in phase with each other we get constructive interference and elevated load events when the tasks coincide.

Aligned Events

Take for example 3 loops – one with a period of 5 minutes, one with 10 minutes and one with 30 minutes. If the loops end up in phase then every 30 minutes we have all three tasks running at once. It’s a mess, and it’s an easy one to prevent – use prime numbers for the values of the periods;

Aligned Events

at least that way the number of coincidental events is minimized, and if any load events show up with a periodicity it is very straightforward to identify what single event, or combination of events, should be responsible. Sometimes I can easily imagine a cron replacement that runs exactly like this, but never get to writing it.

And these sorts of loops show up in places you might not necessarily think of. Caches are a good example. If you serve every piece of content of your website with the same Max-Age, then you can expect a thundering herd of requests whenever a browser or proxy expires them all at the same time. One the other hand, if you use prime number cache lifetimes for each resource, you’ll get much more nicely staggered and spread out series of requests. It’s a really simple, neat, optimisation. Tuning things doesn’t have to be hard.

(November 26, 2009 10:54 PM)

Donncha O'Caoimh: WordPress MU Domain Mapping 0.5

WordPress MU Domain Mapping is a plugin that allows the users of a WordPress MU site to use custom domains on their blogs.

It’s been a while since the last release but with the help of Ron Rennick, and many others (kgraeme – you kick ass at finding bugs!) I think the wait has been worth it. Changes since the last release:

  1. Works in VHOST or folder based installs now.
  2. Remote login added.
  3. Admin backend redirects to mapped domain by default but can redirect to original blog url.
  4. Domain redirect can be 301 or 302.
  5. List multiple mapped domains on site admin blogs page if mapped
  6. Bug fixes: set blogid of the current site’s main blog in $currentsite
  7. Bug fixes: cache domain maps correctly, blogid, not blog_id in $wpdb.
  8. and lots more bugs fixed and squashed.

There are still a few limitations however:

  1. Your WordPress MU site should be installed in the root of your server.
  2. It’s not possible to map a path on the new domain.
  3. You cannot map a domain on to the main blog in a folder install of WordPress MU.

Grab it from the page above, make sure you read the readme.txt as the plugin needs to be installed and configured correctly. You’ll also need to be familiar with concepts such as CNAME and A DNS records and how to configure your server correctly.

Please try it first on a test server. We have gone to extraordinary lengths to try to fix every bug we could but it’s always better to be careful when trying out new software.

Related Posts

(November 26, 2009 04:08 PM)

Dave Airlie: radeon kms 3D speed regression
So Phoronix pointed out we have a KMS/DRI2 3D regression vs UMS/DRI1, two things sprang to mind wrt to places we lost some of this so I did a quick benchmark on my laptop.

Thinkpad T60P, rv530 FireGL V5200, Intel Core Duo T2500 CPU 2Ghz, 1600x1200 LCD

F-12 mostly.

So I ran openarena with Eric Anholt demo at 1400x1050 (not fullscreen)

5 tests, non-kms, kms out of the box, kms with color tiling, kms with vsync remove, kms with vsync removed + colortiling

non-kms: 840 frames 25.3 seconds 33.2 fps 9.0/30.2/55.0/6.7 ms
kms-nontiled: 840 frames 38.2 seconds 22.0 fps 9.0/45.5/81.0/9.4 ms
kms-tiling: 840 frames 31.6 seconds 26.6 fps 19.0/37.6/72.0/7.2 ms
kms-nontiled-novsync: 840 frames 35.7 seconds 23.5 fps 15.0/42.5/77.0/8.9 ms
kms-tiled-novsync: 840 frames 28.7 seconds 29.2 fps 11.0/34.2/66.0/7.6 ms

So there is some explaination of where some of the performance went, I'll definitely enable KMS tiling on r300->r500 where
we should have enough stuff in mesa to deal with all the sw fallbacks (gallium may need some work). The vsync vs non-vsync thing isn't something I really want to change, basically when DRI2 does the back->front copy it doesn't do it when the scanout is in the area being copied so with DRI1 you'd get tearing, with dri2 you get none. We'll also get DRI2 page flipping support at some point, which for a fullscreen app should really improve things. Besides that I'm sure there is lot of optimisation that can be done in the KMS codebase to improve this situation. I (or someone else please feel free) need to break out the profiling tools (perf, sysprof etc) and track down where we can do better.

At the moment the priority is still to make things work first, then make them fast.

(November 26, 2009 09:44 AM)

Dave Airlie: radeon display port working
Finally got some time to take another look at radeon displayport support.

I wrote initial userspace modesetting patches in June to get EDID and by mid July I had it to the stage where I could
get a display if I started X, then used xrandr to switch to a different mode. I ran out of time to continue investigations then.

Last week Alex Deucher rebased my code into the latest DDX and cleaned up a lot of the insanity in it. At the same time I started porting the code to the kernel for KMS support. Alex also picked that up and made the userspace and kernel drivers pretty much act the same. However at the end of this neither of us actually had reliable display port support.

So this morning I discovered that actually every second modeset was working, with ones in between turning off power to the monitor, so I moved a few things around in the displayport link training initialisation code and voila reliable userspace displayport. I then ported the same fix to the kernel and it didn't make it work. Another 2-3 hours of guessing found a missing
return statement which meant we ended up with a version 0 DP identification which broke stuff. With that fixed, KMS displayport started working.

Where can I get this?
UMS/DDX: git://git.freedesktop.org/git/xorg/driver/xf86-video-ati displayport branch
KMS: git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-radeon-dp branch

TODO:
a) When r600 grows IRQ support we need to use the hotplug irq to detect the monitor appearing/disappearing
so we can retrain the link with it, otherwise unplugging the monitor means it won't be there on replug,
unless you change modes, for userspace we probably need to use a timer to detect if the monitor goes away or we lose
training.
b) cleanup code, maybe see what we can share with Intel.
c) merge, I'd say we can nearly merge the UMS code to master, and KMS can definitely go in the next merge window.

[updated for pedants].

(November 26, 2009 03:57 AM)

November 25, 2009
Donncha O'Caoimh: Steal Their Class!

Xbox Live is free for Silver users of the Xbox 360 for the next 5 days in Europe. I just tried Modern Warfare 2 and had my ass handed to me. Didn’t take long for me to see the infamous deathstreak “Steal Their Class!” notice. I was the lowest level player there. Highest was about 67, next lowest was 26. Sigh. Not tempted to buy a Gold membership any more. Thanks Microsoft :)

steal-their-class

I didn’t disconnect on purpose. WIFI died right after I died for the 5th or 6th time. (If you were on #wordpress you just saw me disconnect, honest!) I swear those guys were probably looking out for the dumb newbie. I’m sure my curiosity will be piqued again in the next few days.

The coop in MW2 is excellent though. I might be willing to part with some cash if some friends were online regularly to play that!

Related Posts

(November 25, 2009 09:20 PM)

November 23, 2009
Donncha O'Caoimh: WordPress, Nginx and WP Super Cache

If you host your own WordPress blog, it’s probably on Apache. That all fine and good. For most sites Apache works wonderfully, especially as it’s so easy to find information on it, on mod_rewrite and everything else that everyone else uses.

One of the alternatives is Nginx, a really fast webserver that streaks ahead of Apache in terms of performance, but isn’t quite as easy to use. That’s partly because Apache is the default webserver on most Linux distributions and hosts. Want to try Nginx? Here’s how.

Install Nginx. On Debian based systems that’s as easy as

aptitude install nginx

Nginx doesn’t talk PHP out of the box but one way to do it is via spawn-fcgi. Here’s where it gets complicated. (Docs summarised from here)

  1. Install php5-cgi. Again, on Debian systems, that’s
    aptitude install php5-cgi
  2. Edit /etc/nginx/sites-available/default and add the following chunk of code to the “server” section:
    location ~ \.php$ {
            include /etc/nginx/fastcgi_params;
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param  SCRIPT_FILENAME  /var/www/nginx-default$fastcgi_script_name;
    }
  3. Install lighttpd for the spawning command.
    apt-get install lighttpd

    You’ll probably get an error at the end of the install if Apache is already running on port 80. Edit /etc/lighttpd/lighttpd.conf and uncomment the line

    server.port = 80

    and change 80 to 81. Now run the apt-get command again and it will install.

    /etc/init.d/lighttpd stop

    will stop lighttpd running. (You don’t need it)

  4. Create a new text file, /usr/bin/php-fastcgi with this:
    #!/bin/sh
    /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u nobody -f /usr/bin/php5-cgi

    The user “nobody” should match the user Apache runs as to make things easier to transition.
    Make it executable with

    chmod 755 /usr/bin/php-fastcgi

  5. Create another new file /etc/init.d/init-fastcgi and make it executable with the chmod command too. Put this in the file:
    #!/bin/bash
    PHP_SCRIPT=/usr/bin/php-fastcgi
    RETVAL=0
    case "$1" in
        start)
          $PHP_SCRIPT
          RETVAL=$?
      ;;
        stop)
          killall -9 php
          RETVAL=$?
      ;;
        restart)
          killall -9 php
          $PHP_SCRIPT
          RETVAL=$?
      ;;
        *)
          echo "Usage: php-fastcgi {start|stop|restart}"
          exit 1
      ;;
    esac
    exit $RETVAL
  6. Start the PHP processes with
    /etc/init.d/init-fastcgi start

    and make sure it starts on every reboot with

    update-rc.d init-fastcgi defaults

That’s the PHP part of things. In Debian, the default root is “/var/www/nginx-default” so put an index.php in there to test things out. Stop Apache and start Nginx (if this is a test server only!) and visit your site. Works? Now to get WordPress and WP Super Cache working.

Open up /etc/nginx/sites-enabled/default in your editor and comment out the text already there with # characters. Paste the following in. Change paths and domains to suit your site. (via)

server {
        server_name  example.com www.example.com;
        listen   80;
        error_log   /www/logs/example.com-error.log;
        access_log  /www/logs/example.com-access.log;

        location ~ \.php$ {
                include /etc/nginx/fastcgi_params;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param  SCRIPT_FILENAME  /www/example.com/htdocs$fastcgi_script_name;
        }

        location / {
               gzip  on;
               gzip_http_version 1.0;

               gzip_vary on;

               gzip_comp_level 3;

               gzip_proxied any;

               gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

               gzip_buffers 16 8k;
               root   /www/example.com/htdocs;
               index  index.php index.html index.htm;
# if the requested file exists, return it immediately
               if (-f $request_filename) {
                       break;
               }

               set $supercache_file '';
               set $supercache_uri $request_uri;

               if ($request_method = POST) {
                       set $supercache_uri '';
               }

# Using pretty permalinks, so bypass the cache for any query string
               if ($query_string) {
                       set $supercache_uri '';
               }

               if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {
                       set $supercache_uri '';
               }

# if we haven't bypassed the cache, specify our supercache file
               if ($supercache_uri ~ ^(.+)$) {
                       set $supercache_file /wp-content/cache/supercache/$http_host/$1index.html;
               }

# only rewrite to the supercache file if it actually exists
               if (-f $document_root$supercache_file) {
                       rewrite ^(.*)$ $supercache_file break;
               }

# all other requests go to Wordpress
               if (!-e $request_filename) {
                       rewrite . /index.php last;
               }
        }
}

I think the gzip settings above will compress cached files if necessary but Nginx can use the already gzipped Supercache files. The version of Debian I use doesn’t have gzip support compiled in, but if your system does, take a look at the gzip_static directive. Thanks sivel.

Finally, edit /etc/nginx/nginx.conf and make sure the user in the following line matches the user above:

user www-data;

I changed it to “nobody nogroup”.

Now, stop Apache and start Nginx:

/etc/init.d/apache stop; /etc/init.d/nginx start

WP Super Cache will complain about mod_rewrite missing, and you should disable mobile support.

How has it worked out? I only switched on Friday. The server did do more traffic than normal, but I put that down to the floods in Cork. Weekend traffic was perfectly normal.

Load on the site is slightly higher, probably because my anti-bot mod_rewrite rules aren’t working now. Pingdom stats for the site haven’t changed drastically and I think the Minify plugin stopped working, must debug that this week. Switching web servers is a huge task. I disabled mobile support in Supercache because I need to translate those rules to Nginx ones. A little birdie told me that he’s going to be writing a blog post on this very subject soon. Here’s hoping he’ll put fingers to keys soon.

Have you switched to Nginx? How has your switch worked out for you?

Related Posts

(November 23, 2009 12:34 PM)

November 19, 2009
Donncha O'Caoimh: WP Super Cache 0.9.8

WP Super Cache version 0.9.8 is now available. WP Super Cache is a page caching plugin for WordPress that will significantly speed up your website.

New in this release are 2 translations. The Spanish translation is by Omi and the Italian by Gianni Diurno. Please, if you use their translations, drop by their sites and leave a thank you comment! They’ve been very patient with me as I fixed gettext bugs and added new text. Both have blogged about the translations if you need to know more: Gianni, Omi.

The second major feature to go in is an “advanced” section to the debugger. This allows the plugin to check the front page every 5 minutes to make sure everything is ok. It monitors for 2 very rare problems:

  1. Very very occasionally, the front page becomes a gzip file that downloads. It happened here once and I examined the cache file. There was nothing wrong with it. It was perfect. I suspect Apache and mod_rewrite got confused somehow but clearing the cache fixed it. The file generated after was exactly the same size as the old one, so no chance it got “double gzipped”.
  2. In certain rare cases, where a blog has a static front page, and uses a permalink structure of /%category%/%postname%/, the wrong page may be cached as the front page. Even if your blog satisfies the two conditions above it may not suffer from this problem. I tried it on this blog for a few days and couldn’t reproduce it at all!

Nevertheless, if you’re concerned edit your wp-cache-config.php and add this line:

$wp_super_cache_advanced_debug = 1;

Reload the admin page and you’ll see this added to the debug section:

advanced-debug

If activated, it will check your front page every 5 minutes. It’s not activated by default because these errors only happen to a small number of blogs. I’ve also noticed that WordPress seems to randomly forget to run the page checker from time to time. I debugged it and the job simply disappears from the wp-cron system! I’ve no idea why, but reloading the admin page schedules it again.
If you’re still paranoid, set your cache expiry low so at least the cache files will be recycled quickly.

Caching, Minification and CDNs

Oh, there’s a new caching plugin on the scene. W3 Total Cache works like Supercache’s half-on mode but can store to memory as well as disk (like Batcache) but also does minification and supports CDNs. I’ve been asked a few times if I’ll support those features too but I don’t see why as other plugins already have that covered (and frankly, I don’t have time to maintain such complex features):

  1. WP Minify “integrates the Minify engine into your WordPress blog. Once enabled, this plugin will combine and compress JS and CSS files to improve page load time.” Thaya is very responsive and fixed a bug I reported quickly.
  2. There are any number of CDN plugins for WordPress. I don’t use a CDN so I can’t recommend one but OSSDL CDN Off Linker might be worth a shot. This post on it mentions Supercache plus, a fork of this plugin.

Traffic Spikes and Benchmarks

I really should collect more of these. A few weeks ago Mark Pilgrim blogged about how his book had been republished by a 3rd party and put up for sale on Amazon. His book was published under the GNU Free Documentation License so that’s perfectly legal to do, even if a little unusual as it can be downloaded from Mark’s website and is for sale by his publisher. The blog post generated a lot of interest and a few days later I received a donation from Mark, followed by a thank you email. I’m a big fan of what Mark does, so if it had been a physical cheque or a letter I’d have framed it!
A few days after that he tweeted the following graph. Nice spike of traffic eh? His server held up fine with help from WP Super Cache.

diveintomark.org-dashboard

And finally, some benchmarks, in Russian unfortunately but the pages translates well.

caching-benchmarks

Summary of changes in 0.9.8:

PS. WordCamp Ireland is on in early March next year in picturesque Kilkenny. Here’s Sabrina’s launch post. Sign up! I’ll be going!

Related Posts

(November 19, 2009 02:20 PM)

November 18, 2009
Donncha O'Caoimh: WordPress MU 2.8.6

WordPress MU 2.8.6 has just been released and may be downloaded immediately.

This is a security release with the same fixes as WordPress 2.8.6 plus quite a few MU specific bug fixes too.

Please upgrade as soon as you can.

Related Posts

(November 18, 2009 03:20 PM)

Caolan McNamara: DEV300_m65

With DEV300_m65 unused methods reduces to 886 as hwpfilter drops out of the list.

idling
Some other work ongoing on removing permanent timers which are constantly triggering when we should otherwise be idle. 3.2 will have the clipboard polling removed which makes the bare frame idle without wakeups, while patches for making math idle have been applied for 3.3. The spell checking loop in impress and draw never ends at the moment, patch available to fix that, as well as fix the graphic and ole cache manager loops to not run if unnecessary. I’ve no fixes for the more complicated writer and calc idle loops yet however.

strict aliasing
Good bit of progress on making OOo strict aliasing safe as well.

cppcheck
Played around with cppcheck as well, mostly discovered missing checks in various workbench tools and build-time tools, but a few good catches on stl iterators in main-line code, and very good on new[]/new vs delete/delete[]. A few false STL positives as well, but upstream is responsive to bug reports, so next version will give a better set.

(November 18, 2009 08:45 AM)

November 16, 2009
Donncha O'Caoimh: Retro consoles for sale again!

Retro gaming has made a comeback! A temporary looking shop on North Main Street in Cork is selling old retro consoles at possibly “Irish” prices. According to the “Bargain Hunt” section in Retro Gamer, a Sega Dreamcast can be purchased on Ebay for about £25 Sterling. They’re going for 59.99 Euro here. Cheap enough for an impulse buy? What do you think Mark?

What’s on offer? I saw the Dreamcast of course, many Gameboys in the window, NES, SNES, Sega Mega Drive (Mega CD), Sega Master System, Nintendo Gamecube (why bother when you have a Wii?), Original Playstation, Master System II with Sonic the Hedgehog cart still stuck in it, Xbox 360 external HD DVD player (40 Euro? Can you buy those discs?) and lots of games. I think there were original Xboxes too. There were loads of games for the system anyway.

I doubt the shop will be open after Christmas, none of the consoles or games look brand new so it might be best to test out any purchases when you get home before wrapping them up for Christmas. Bring a copy of Retro Gamer with you if you go in to check the price on Ebay. I have a feeling the guys running the shop will be more than happy to haggle!

Thanks Richard for the heads up. Worth going in there just for the look. I think Branedy may be interested in it too. (I never owned any of the consoles above so I didn’t get a burst of nostalgia for them!)

Related Posts

(November 16, 2009 02:00 PM)


Powered by Planet!
Last updated: February 09, 2010 12:05 AM