Politifact – partisan?

So, not entirely happy with the new Australian Politifact.  I’ve seen reports of the US version being politicised, including this (rather partisan) post on the general matter of fact checking sites in the last US election. (HT: Kiwiblog).  I had a little worry about the fact that Politifact Australia was being set up by a guy who used to run the Sydney Morning Herald, which has a noted left wing editorial line.

I was looking at the Australian site yesterday after a day of claim and counter-claim around the budget.  I perhaps expected that there would be some coverage of “the $70B black hole” in the Coalition budget plans, amongst other topics.  I’d seen some earlier analysis on the site, and reserved judgement – it was neither great nor dreadful.

Looking at the latest few posts, I’m quite concerned.  I think it’s really important that a fact checking site be clearly and obviously non-partisan, and it doesn’t look that way at the moment.

Read more of this post

Rails, Cancan and Rolify: instance based access control

I’ve been working on instance-based access control using rolify and Cancan.  It took me a while to work out what’s happening here, so I thought I’d share it.

Rolify is a Gem that provides a roles database table, and also some methods that hook on to your models and users.  Cancan is an access control mechanism that hooks into your controllers, and checks whether users have been granted access to the operations they’re attempting to perform.

My first misconception was imagining that Rails goes to the database, gets a list of objects, and then calls through to Cancan to say “can this user access this object.”  This mental model caused a lot of misunderstandings for me.

Read more of this post

Space habitats, reusable space craft

So, there’s a part of me that’s disappointed by the progress of space travel.  Sure, the Apollo program cost (at peak) nearly 1% of US GDP, but it still remains that we went to the moon. What have we done recently that’s even half as cool?

Read more of this post

Rails generator templates: optionality

I’ve been working on tailoring the rails generator templates – in particular the scaffold generator.  Tailoring these templates allows you to automatically generate objects that have much of the content you want for your application.  My base generator templates came through using the twitter bootstrap application builder – it included Devise, FactoryGirl and Rspec for me.  However, I found that when I was building objects I was often writing the same code over and over again, and more annoyingly, the same unit tests over and over again.

Read more of this post

Clearing Space Junk

So, I hear on the radio today how they’re planning to adjust the orbit of space junk using lasers.  Basically they identify space junk that might collide with a satellite we care about, then they push it with a laser so as to adjust the orbit enough to avoid collision.  They’re also talking about launching satellites that can intercept large space junk and de-orbit it.

My thought – why try to de-orbit space junk?  We spent a lot of money getting that stuff into space, it’s almost certainly made out of materials we could do something with.  People are talking about intercepting asteroids so as to mine them, and build space habitats or other cool stuff.  Why can’t we do the same with space junk?

Read more of this post

Even worse – it could be a negative

Thinking more about this, it could be a negative for Gillard.  She’s going into the election fighting with the states.  On health, they recently tried to cut money from Victoria.  Victoria just passed those cuts on to hospitals, and every day there was a new media report of cuts in health care caused by the Federal govt.  Gillard caved and gave the money back.

So the plan on Education is that the states must sign up to Gonski or get their funding cut.  When do the cuts take effect?  Middle of the school year?  What’s the bet Newman and Barnett will be out there with lists of schools that will have to be closed because of the Federal govt’s funding cuts.  Which will force Gillard into another embarrassing backdown, all of which could have been avoided by not starting this dance in the first place.

Once again, poor political management.

Rdiff-backup error 22 on NFS file system

I’ve been using Rdiff-backup to take an incremental backup every 15 minutes of the directory I store code in.  Logic being that I occasionally decide to do some refactoring that I probably shouldn’t have, and if I’m not disciplined with using git then I don’t have a save point.  I suspect I don’t really need this, but it’s been running.

Recently it started giving an error along the lines of :Exception ‘[Errno 22] Invalid argument: ‘/home/backups/development-apps/apps/tmp/rdiff-backup.tmp.479” raised of class ‘<type ‘exceptions.OSError’>’

Read more of this post

Gonski reforms not working yet for PM

The PM was counting on the Gonski reforms to provide her circuit breaker and election message.  The aim was to get at least some states to agree to them, and then she could make an election message out of how Labor would put money into schools, and the Libs wouldn’t.  She could do this safe in the knowledge that she didn’t really have to explain how she’d pay for it, and that they were going to use smoke and mirrors to cover up the worst of the budget holes (such as the 2015 hole that will occur if European carbon prices don’t increase).

Unfortunately for her, that plan relied on at least some premiers agreeing to the plan.  This involved giving out very little information, but skewing the funding model so a couple of big and potentially friendly states were getting enough money that they couldn’t say no.  The premiers didn’t fall for that, and are saying they want enough information to make a sensible decision.  Gillard would prefer not to give out that level of information, as it creates the risk of someone noticing that the emperor has no clothes.

Read more of this post

Someone noticed: the EU carbon price has crashed

And that creates a $5B per annum hole in the Australian carbon tax projections once it converts to a floating price.  Refer http://www.theaustralian.com.au/national-affairs/climate/eu-carbon-collapse-deals-blow-to-australia/story-e6frg6xf-1226622388327.  I heard the Greens on the radio today hoping that the EU fix the price – otherwise known as increasing taxes.  The point of a floating price is that you set the level of emissions you’re happy with, and give permits to that level.  The price then goes up and down based on how hard it is to reach that level of emissions.  Apparently if it ever becomes too easy the right thing to do is to put the price up.  Anyone would think the aim was to subsidise renewable energy generation (many Greens have investments in renewables…) rather than to reduce emissions.

Could be interesting times.  The Libs have finally worked out that this is a problem.

Rails and rspec – test performance

So, I’ve been mulling over the performance of Rspec today. I know I’ve put too much into my controller test cases – I have chosen not to stub out all the database work, and this means that each test case creates a lot of test data, and executes a lot of transactions on the database. My current test suite for one controller runs in about 4 minutes. I’ve been working on what I can do to improve that.

Read more of this post

Follow

Get every new post delivered to your Inbox.