AngularJS and Rails Tutorial: part 5 New and Delete, initial $resource error handling

Part 5 of a tutorial that connects AngularJS to a Rails backend. This post focuses on updating our modal form to support the “new” function, adding a delete button to our ngGrid, and adding error handling in case our rails application rejects our updates.  The previous post was Using ngGrid and building an edit popup, the next post is creating teams, and a relationship between team and club.  You can also find the index of the posts in the tutorial, or hit the tutorials menu at the top and select the Rails 3 tutorial.

There is a newer, rails 4 and newer angularJS, version of this tutorial.  It is also more complete and has a nicer UI that doesn’t use modal windows, which is probably a better choice for anyone starting fresh today.  The first page in that tutorial is here, and the index here. Continue reading

Advertisements

AngularJS and Rails Tutorial: part 4 ngGrid and edit in a modal popup

Part 4 of a tutorial that connects AngularJS to a Rails backend. This post focuses on extending our club list view to use a grid instead of a basic list, and providing a modal form to edit the clubs.  The previous post was Adding a list (query) page to the AngularJS app, the next post is New and Delete.  You can also find the index of the posts in the tutorial, or hit the tutorials menu at the top and select the Rails 3 tutorial.

In the third post we hooked our AngularJS app to our rails app, and provided a list of clubs from the rails server.  If you haven’t completed the earlier posts in this tutorial series, download the code from github: tutorial_3.  In this post we’re going to extend in two ways – using the ngGrid control to provide a nicer looking list that has a lot of tailoring options, and we’ll be creating modal popups for the editing functions.

There is a newer, rails 4 and newer angularJS, version of this tutorial.  It is also more complete and has a nicer UI that doesn’t use modal windows, which is probably a better choice for anyone starting fresh today.  The first page in that tutorial is here, and the index here.

Continue reading

AngularJS and Rails Tutorial: part 3 a basic list using $resource for a restful query from rails

Part 3 of a tutorial that connects AngularJS to a Rails backend. This post focuses on tailoring ng-boilerplate, using ngResource to obtain data from rails, and introducing karma unit testing.  The previous post was Installing ng-boilerplate, and serving up via Rails, the next post is Using ngGrid and building an edit popup.  You can also find the index of the posts in the tutorial, or hit the tutorials menu at the top and select the Rails 3 tutorial.

There is a newer, rails 4 and newer angularJS, version of this tutorial.  It is also more complete and has a nicer UI that doesn’t use modal windows, which is probably a better choice for anyone starting fresh today.  The first page in that tutorial is here, and the index here.

Continue reading

AngularJS and Rails Tutorial: part 2 ng-boilerplate served by rails

Part 2 of a tutorial that connects AngularJS to a Rails backend. This post focuses on building the base angularjs application itself, which we’re going to create using the ng-boilerplate set of application scaffolding from joshdmiller.  The previous post was Building the rails app, the next post is Adding a list (query) to the AngularJS app.  You can also find the index of the posts in the tutorial, or hit the tutorials menu at the top and select the Rails 3 tutorial.  Continue reading

Rudd and Immunisations

Rudd is today heading towards requiring all parents to have their children immunised or lose the family tax benefit part A, i.e. removing the conscientious objection provision.  I don’t understand who he’s appealing to with this policy, so I must be missing something.

It seems to me that the people who don’t immunise are usually people who don’t believe the science and believe one of the variants of bad things about immunisations that you can find on the internet – ranging from it causing autism through to it giving you the very disease that it’s supposed to immunise against.  Let me generalise and say that these people would be one of two groups:

  • Green voters who dislike science and disbelieve it
  • Strongly religious people who dislike science and disbelieve it

What Rudd needs so as to win is for people to shift their votes from Liberal to Labor, or (less so) to shift their votes from Green to Labor.  This seems to me the kind of issue that isn’t going to draw people in to vote for you – the people who are getting their kids immunised today aren’t going to shift their votes because of this.  But it could be the kind of issue that shifts votes away from you.  Now he’s retaining the religious exemption (which in itself seems unusual, surely a bunch of people will just claim that exemption instead?), so he probably won’t drive away the religious vote.  But I’m not sure he had that anyway.  But he’s probably going to drive some voters to the Greens, and keep some Green voters from voting for him.

I can see only two possible motives for this change:

  1. He’s trying to demonstrate distance from the Greens, so he’s picked something that’s sure to draw howls from the Greens whilst still keeping enough loopholes that it actually impacts nobody;
  2. There’s perhaps something hiding under the comments about some specific communities having low immunisation rates – so there’s some sort of dog whistle in here that I’m not picking.

I’ll also have a free swipe at the Australian for lazy reporting.  They report the immunisation rate as being 90%, that the rates are unevenly distributed, and that in one Medicare local there are 3600 children not immunised.  But don’t tell us 3600 out of how many – so we don’t know whether this is 89% immunisation – i.e. close to the National rate – or 10% immunisation, which we might be concerned about.

At the moment my money is on option 1 – this is attempting to make the Greens say bad things about Labor, and therefore create media coverage that suggests the Greens and Labor aren’t working closely together.

Remote walls and thermal bridging from fasteners

When reviewing the search terms that people visit here with (yes, I know, kind of like egosurfing), I saw a couple of people coming here looking for remote walls and thermal bridging.  And I did recently do some searching and found relevant content.

To recap, remote wall construction is a technique where you leave your wall cavities empty, you sheath the outside of your timber framing, you run an air/moisture barrier over the sheathing, then you put polystyrene over the outside of that (continuous insulation), and finally cladding over all of it.  The advantages are that:

  • your air barrier is moved outside the walls – so you don’t break your air barrier when you install power points and the like, so your house is much more air tight and therefore warmer
  • your insulation isn’t prone to thermal bridging from the studs
  • your insulation is rigid foam instead of batts – not as susceptible to collapsing and giving a lower R-value than you thought

You can combine with a similar system over the roof, giving you a conditioned ceiling cavity to run services in (and avoiding having fibreglass in your ceiling, which is one of my pet hates).

So, one of the questions that goes with all this is how you install continuous insulation, and cladding on the outside, without creating thermal bridging.  The document I found that seems most authoritative is this study.  And I think the conclusion is that the thermal bridging isn’t as bad as you might think, and in turn that means (thankfully) that you can just make your cladding as well attached as you need, and not mess around with fasteners that might not be durable or might not stand up to the wind you might expect.

 

Rudd, all or nothing?

A couple weeks ago I commented on Rudd’s all or nothing approach.  In summary my hypothesis is that Rudd is in it for himself, not for the party.  He wants to win the election, if he doesn’t then he’s dog tucker straight after.  The party and the caucus, however, would really prefer he didn’t win.  They don’t want him as PM, they just didn’t want to lose as badly as Julia was taking them towards.  This misalignment of expectations looked like it could be very problematic.

However, I think we’re now heading towards a world where Rudd starts to realise he can’t win.  The polls haven’t moved enough, and he probably feels like he was pressured into going to the election before he was ready.  It’s not clear that he has much left in his kit bag for the remaining 4 weeks of the campaign.  The question is what he does in this situation.  He’s a tireless worker, we know that, so we wouldn’t expect him to slack off.  Perhaps he’ll work super hard and start making mistakes?  He is still calling the shots to some extent – the party made him leader, and so long as he announces things publicly they have a hard time contradicting him.  The problem is that there’s no fun in announcing stuff that you know you won’t be around to implement and that therefore is pointless.

So what do you do?  I think there’s a real chance of some interesting behaviour in the upcoming period, and a real chance of Rudd gambling and losing – doing something so out there/on the edge that it ends up costing votes.  There’s also a chance that he starts working out how to create a legacy – to lock in things that he wants done and that the party can’t back away from when he’s gone.  Time will tell.