Australian v’s Fin: Shorten

So, the Australian today has a lengthy article on how Shorten was instrumental, and brought across the late votes that swung it for Rudd – he was actively working the phones.  The Fairfax media, namely the Fin, is saying that Shorten was not the king maker people thought, in fact he had hardly any impact at all, only 3 votes (2 people came across with him) and Gillard would have gone either way.

So, whose interests are being looked after here?  My guess is that Shorten would like to have it both ways – he was decisive and on the right side of history so he’s clearly leadership material, but he is also not guilty of knifing a second PM in the back because that would make it hard for him to be leadership material.

It’ll be interesting to see if either paper changes their story over the next few days.

Rudd: pros and cons

So, I’m not going to get into predicting the election.  I was getting around to thinking that Abbott would beat Gillard, and that Rudd would not roll Gillard.  Clearly the second bit wasn’t right.  The smart money remains on Abbott to win, I’d just note that Rudd will have a bounce and some of Abbott’s support is soft.  And that a bit of ill discipline in the Libs could see them lose it.

What I’m interested in today is what this means for Labor.  There are a lot of senior Ministers retiring at the next election.  Stephen Smith today, Swan, Gillard, Emerson and Garrett yesterday.

So, let’s assume Rudd will lose too (not a given when so much of the media love him, but let’s assume).  So, once a party loses, what they need is renewal.  They won’t get back into power until they show generational change.  If they lost without changes now, then those people would all resign gradually, perhaps with by elections, and the process would be slow.  Conversely, by elections are easier to win – people might be feeling like they’d given the coalition too much power and come back to Labor.

So, this current process is bringing some of the bloodletting forward, but at the cost of probably losing some additional seats.  Is that good or bad for Labor?  My feel is probably net good, even if it means they have a smaller core to rebuild from over the next few years.

Australian Editorial: Put up or shut up

Today’s editorial in the Oz could broadly be summarised as “put up or shut up.”  Basically they’re saying that they’ve been receiving backgrounding from inside sources who keep indicating the move is on.  But who then in public say that the Australian is making stuff up.  They are essentially saying that those people need to take a look at themselves – they are either going to do something about changing leader, or else they should shut up and stop ruining their party’s chances of a decent result in the election.

This upcoming week should be interesting.  I still see no evidence that Gillard will jump, nor that Rudd will challenge.  And after seeing what happened to Crean, I doubt anyone else will attempt to be the catalyst.  I still give it less than 50% chance of a challenge.

Labor this week – will Gillard make it?

Lots of speculation over the last couple weeks.  The radio this morning tells me that Gillard no longer has the numbers in caucus, but that Rudd won’t challenge, it will have to be triggered somewhow.  Someone had told the radio that it would take “two senior ministers publicly switching sides,” which feels like wishful thinking – do they actually have it on authority from Rudd that such a thing would make him challenge, or from Gillard that that would cause her to stand aside?  I suspect not.

The Galaxy poll this morning says that Gillard has lost support amongst men and gained no support amongst women – the gender war she ignited has unsurprisingly not brought any votes to her (when she’s seen as the protagonist, and therefore as divisive), and has annoyed a bunch of people.  Bluntly speaking, you cannot win an election by dividing the voters into two equal size groups and demonising one of them – because that requires you to win 100% of your half.  If you’re going to play the politics of division you have to divide into a big group and a small group, and demonise the small group – think “the rich” or “immigrants” or “employers”, not “men”.

What do I think is likely to happen?

Continue reading

Datatables and rails, server side or not?

When using datatables one of the big questions is whether to go with server-side processing or client-side processing.

With client-side processing all the data is retrieved in one go, and held in memory on the browser.  Paging and filtering are done locally in the browser.

With server-side processing the data is retrieved in pages.  A subset of data (typically a page) is returned to the browser, when the user pages down, changes the sort order or changes the filter criteria, a request is made to the server for a new page of data.

We’ve spent a bit of time thinking about which we would want for the application, and this post goes through the pros and cons as I see them.

Continue reading

Rails and datatables, lazy loading and using a single controller

Datatables are a fantastic way of displaying your data in a table, with lots of formatting and processing options. Datatables is open source code, and turn up all over the web. You can find the current release at datatables.net, an example of a datatable in operation is on that front page.

Whilst datatables are very cool, integrating them into Rails isn’t quite as easy as you might want. I’ve been following the instructions on the railscast on the topic, which is also predictably well written and clear, and gets you started well. Having said that, it has some elements that don’t quite fit what I wanted for my framework:

  1. It does either client side datatables, with the data sourced from re-processing your index page, or server-side datatables, but nothing in-between.  This has some performance impacts (discussed in a later post)
  2. It doesn’t use some of the additional elements I wanted, such as column re-ordering and editing in place
  3. It doesn’t use the filter classes, which I’d also like to use
  4. The way it integrated into the controller didn’t suit my view of how it should look (although noting I’m not exactly a ruby expert, what I think is elegant might not fit other people’s view of the same)

So this post covers the way that I integrated datatables into my framework, drawing heavily from other resources on the web as I go.

Continue reading

Rails, datatables, performance and eager loading, joins and includes

I’ve been working on integrating Rails and datatables, following a range of very good tutorials on the web, the best of which I think is the railscast on the topic.

An area of discussion has been whether to go with server-side or client-side processing. In a separate post I’ll talk about that, but for now we’re going client-side. That means that we need Rails configured to push a reasonable number of rows (say 1,000-10,000) down to the browser reasonably quickly. This post discusses some work I’ve done to try to achieve that, with a sample table + 5 joins to subsidiary tables, I’ve moved from 14s to 1.4s, which I think is a worthwhile improvement.

Continue reading