Fat Vegan http://fatvegan.com Sat, 05 Jul 2008 03:24:09 +0000 http://wordpress.org/?v=2.5.1 en Ryan & Laurence are girls http://fatvegan.com/2008/07/05/ryan-laurence-are-girls-2/ http://fatvegan.com/2008/07/05/ryan-laurence-are-girls-2/#comments Sat, 05 Jul 2008 03:24:09 +0000 Ryan http://fatvegan.com/2008/07/05/ryan-laurence-are-girls-2/
Ryan & Laurence are girls, originally uploaded by Nutloaf.

Laurence & I went to the housewarming at the Lumpery the other night. It was a carnival sideshow theme, but we ended up pretty much dressing girly. I think I might have been some sort of ringmaster gypsy psychic.

]]>
http://fatvegan.com/2008/07/05/ryan-laurence-are-girls-2/feed/
Ryan & Laurence are girls http://fatvegan.com/2008/07/05/ryan-laurence-are-girls/ http://fatvegan.com/2008/07/05/ryan-laurence-are-girls/#comments Sat, 05 Jul 2008 03:05:27 +0000 Ryan http://fatvegan.com/2008/07/05/ryan-laurence-are-girls/
Ryan & Laurence are girls
Originally uploaded by Nutloaf

Laurence & I went to the housewarming at the Lumpery the other night. It was a carnival sideshow theme, but we ended up pretty much dressing girly. I think I might have been some sort of ringmaster gypsy psychic.

]]>
http://fatvegan.com/2008/07/05/ryan-laurence-are-girls/feed/
University is done http://fatvegan.com/2008/06/26/university-is-done/ http://fatvegan.com/2008/06/26/university-is-done/#comments Wed, 25 Jun 2008 23:00:47 +0000 Ryan http://fatvegan.com/?p=4201 I have finished university. And finished it for good.

Oddly enough, my university degree and my university job both finished on the same day. I am very glad. Both were very good and edifying in so many ways. But also often pretty exhausting.

]]>
http://fatvegan.com/2008/06/26/university-is-done/feed/
Zohan http://fatvegan.com/2008/06/24/zohan/ http://fatvegan.com/2008/06/24/zohan/#comments Tue, 24 Jun 2008 13:22:01 +0000 Ryan http://fatvegan.com/?p=4200 Zohan was two hours of cheap shots at Arabs, Jews, women and Mel Gibson. But there were plenty of bad bits too.

]]>
http://fatvegan.com/2008/06/24/zohan/feed/
Phone boxes and fancy cafes http://fatvegan.com/2008/06/18/phone-boxes-and-fancy-cafes/ http://fatvegan.com/2008/06/18/phone-boxes-and-fancy-cafes/#comments Wed, 18 Jun 2008 13:23:31 +0000 Ryan http://fatvegan.com/?p=4199 My old friend from Rough Edges was having a bad night tonight. She was pretty crazy on rum and drugs. She was shouting and hitting stuff and smashing the phone receiver on the phone box as hard as she could. Her friends were worried about her. I haven't seen her that upset before, and she often gets upset. It wasn't nice to see her like that and it wasn't nice to be around. I was sitting there listening to her shout thinking about how ugly it all was and how awful alcohol can be. But then some rich young things sitting in the cafe across the road started heckling her. And I realised that yelling and hitting the phone box with the phone receiver doesn't even approach the levels of ugliness humans are capable of. Not even close.

Rich people are obviously at a huge disadvantage because their lives are so pretty, that when they start acting ugly (which is kind of always for a lot of them) it's desperately ugly. Like tonight. I almost walked over to them to ask them to have some dignity.

]]>
http://fatvegan.com/2008/06/18/phone-boxes-and-fancy-cafes/feed/
Album to Album Artist in iTunes for Windows http://fatvegan.com/2008/06/18/album-to-album-artist-in-itunes-for-windows/ http://fatvegan.com/2008/06/18/album-to-album-artist-in-itunes-for-windows/#comments Wed, 18 Jun 2008 02:02:01 +0000 Ryan http://fatvegan.com/?p=4198 iTunes has some wacky album ordering which can screw up coverflow pretty badly. You have to set your "Album Artist" for each album. You'll probably have to do this manually for your compilation-type albums, but there won't be many of those. The bigger problem is setting the field for all your other albums.

There are AppleScript's to copy the "Artist" field to an empty "Album Artist" field namely Doug Adam's one, but that only works on Macs. I started writing myself a iTunes Windows scripting thing, but I'm too lazy to figure it out.

I found Mp3tag through Yahoo! Answers and it's very good.

To copy the field with Mp3tag:

  1. Create an action group called "Album to Album Artist"
  2. Add a new "Guess values" action to that and set the "Source format" value to %artist% and the "Guessing pattern" value to %band%
  3. Run that action group for all your albums with an empty "Album Artist" field
  4. You'll probably have to clear iTunes cache (use "Get Info" on all your tracks, don't change anything but press "OK")
  5. You are done
]]>
http://fatvegan.com/2008/06/18/album-to-album-artist-in-itunes-for-windows/feed/
Peg Bucket http://fatvegan.com/2008/06/16/peg-bucket/ http://fatvegan.com/2008/06/16/peg-bucket/#comments Mon, 16 Jun 2008 00:54:00 +0000 Ryan http://fatvegan.com/?p=4197

I think this is the table in our backyard. And I think the dark splotch on the table is our peg bucket.

]]>
http://fatvegan.com/2008/06/16/peg-bucket/feed/
Apache again http://fatvegan.com/2008/06/16/apache-again/ http://fatvegan.com/2008/06/16/apache-again/#comments Sun, 15 Jun 2008 15:19:15 +0000 Ryan http://fatvegan.com/?p=4195 I've finally ditched lighttpd + fastcgi and replaced it with Apache on smurf. Lighttpd was good, but fastcgi was a total dog. It broke all the time and it got to the point that I didn't want to host my friends sites anymore. Every time I went on holidays fastcgi seemed to fall over and all the sites would be down for a day or three.

So I've gone back to the stable world of Apache, although not on the important server. In all the years I used Apache and mod_php it gave me no problems at all. A total rock. I was seduced by lighty's memory footprint, but I was a fool.

I'll move the other server over to Apache as well at some point, the one with Thoughtful Foods and KSAsub.. I thought rewriting all the configuration files was going to be a pain, but it was actually really quick. RewriteCondition with -f is bloody marvellous.

]]>
http://fatvegan.com/2008/06/16/apache-again/feed/
Coca Cola Umbrella http://fatvegan.com/2008/06/14/coca-cola-umbrella/ http://fatvegan.com/2008/06/14/coca-cola-umbrella/#comments Sat, 14 Jun 2008 03:50:42 +0000 Ryan http://fatvegan.com/2008/06/14/coca-cola-umbrella/ Coca Cola Umbrella

This photo makes me happy.

]]>
http://fatvegan.com/2008/06/14/coca-cola-umbrella/feed/
New Renewable Generators http://fatvegan.com/2008/06/12/new-renewable-generators/ http://fatvegan.com/2008/06/12/new-renewable-generators/#comments Thu, 12 Jun 2008 07:17:33 +0000 Ryan http://fatvegan.com/?p=4193 I'm trying to find a green energy supplier, because Origin Energy is slightly ridiculous. So I ended up reading the fine print of the Green Electricity Watch website. I wanted to know why some companies were getting much higher ratings than others, even though they were all "100% Green".

I found this...

9.Why isn't any renewable energy good? Why does it need to be new and accredited?

When someone buys GreenPower, they usually want to make a difference to their greenhouse emissions. If their purchase has no effect on the amount of renewable energy that goes into our electricity system, it has no effect on greenhouse emissions. Green Electricity Watch considers the non-accredited part does not increase the amount of renewable energy. Accredited GreenPower is certified to come from new renewable generators - additional since when the scheme started – and continuing sales increase the size of the market so more renewable energy generation is built.

...which strikes me as pretty dumb. They're suggesting that we should build new renewable energy plants instead of using existing renewable power plants. Not only are they suggesting that, but they're including it in their evaluation of green energy providers. I can understand wanting to encourage further investment in renewable energy, but it seems to be creating some perverse incentives to build new plants when there are perfectly good ones sitting there already.

So I think that instead of trying to change to Origin because it has a slightly higher rating, I'll just stick with Energy Australia....

Except I just rang Energy Australia and they only do fixed price deals. So we'll be paying $108 extra per quarter for only $49 worth of green energy. Stupid capitalism. I want my own farm with a wind generator on it.

]]>
http://fatvegan.com/2008/06/12/new-renewable-generators/feed/
Sort by two object attributes in Ruby http://fatvegan.com/2008/05/31/sort-by-two-object-attributes-in-ruby/ http://fatvegan.com/2008/05/31/sort-by-two-object-attributes-in-ruby/#comments Sat, 31 May 2008 02:24:48 +0000 Ryan http://fatvegan.com/?p=4191 This is a potentially ugly to solve, but you can actually compare two arrays. So it isn't so bad. If the first attributes are the same, it sorts by the second.

def <=>(other)
  [self.dtstart, self.dtend] <=> [other.dtstart, other.dtend]
end
]]>
http://fatvegan.com/2008/05/31/sort-by-two-object-attributes-in-ruby/feed/
Sigur Rós - Gobbledigook http://fatvegan.com/2008/05/28/sigur-ros-gobbledigook/ http://fatvegan.com/2008/05/28/sigur-ros-gobbledigook/#comments Wed, 28 May 2008 13:57:55 +0000 Ryan http://fatvegan.com/?p=4188 Sigur Rós made the best video clip ever. It's all naked people running around a forest for several minutes. Totally wonderful. Good song too.

]]>
http://fatvegan.com/2008/05/28/sigur-ros-gobbledigook/feed/
Dawn of the Dead http://fatvegan.com/2008/05/28/dawn-of-the-dead/ http://fatvegan.com/2008/05/28/dawn-of-the-dead/#comments Wed, 28 May 2008 13:55:33 +0000 Ryan http://fatvegan.com/?p=4187 We just watched George Romero's original Dawn of the Dead. It was fully sweet. I really loved the remake, but this was great in a whole different way. It wasn't as funny or smart, but it was quality. And interesting, which isn't something one tends to say about zombie films. Except 28 Days Later I guess.

It was real good but. Good gore spatterings. Lots of gore spatterings. More than you could reasonably ask for in one film.

]]>
http://fatvegan.com/2008/05/28/dawn-of-the-dead/feed/
European Dates in Ruby on Rails http://fatvegan.com/2008/05/27/european-dates-in-ruby-on-rails/ http://fatvegan.com/2008/05/27/european-dates-in-ruby-on-rails/#comments Tue, 27 May 2008 00:27:02 +0000 Ryan http://fatvegan.com/?p=4186 I found a solution to the problem of month/day ordering by overriding the autocasting code in ActiveRecord. However, that didn't solve the problem more generally. So I came up with a nicer solution that uses the existing Date::Format._parse_sla_eu method. It replaces the US year/month/day parsing method with the European one.

# Overrides the default Date::_parse() method for dates of format dd/mm/yyyy
# ParseDate does the typical American thing and assumes mm/dd/yyy and
# doesn't seem to be configurable

module Date::Format::EuropeanDates
  def self.included(base)
    base.class_eval do
      class << self
        alias_method :_parse_sla_us, :_parse_sla_eu
      end
    end
  end
end

Date.send(:include, Date::Format::EuropeanDates)

With thanks to Simon who showed me how to replace static methods. This is the kind of wacky stuff you could never do with PHP. Not that we should want to. It's kind of ridiculous.

]]>
http://fatvegan.com/2008/05/27/european-dates-in-ruby-on-rails/feed/
The Basics Album http://fatvegan.com/2008/05/23/the-basics-album/ http://fatvegan.com/2008/05/23/the-basics-album/#comments Fri, 23 May 2008 01:35:19 +0000 Ryan http://fatvegan.com/?p=4185 Wally from The Basics (and Gotye) is kind of a web geek I reckon. He manages all their CD ordering and mailing himself it seems. He even hand-wrote the addresses on my Gotye CDs when I ordered them. Ordering CDs online seems like a slight waste of postage, but I also reckon the musicians must get a fair chunk more. Especially if they reckon it's worth the effort of building CD ordering applications and posting people the CDs themselves.

]]>
http://fatvegan.com/2008/05/23/the-basics-album/feed/
Sigur Rós http://fatvegan.com/2008/05/23/sigur-ros/ http://fatvegan.com/2008/05/23/sigur-ros/#comments Thu, 22 May 2008 23:35:16 +0000 Ryan http://fatvegan.com/?p=4184 Libby and I are going to Sigur Rós on the 2 August 2008. They are pretty damn good.

]]>
http://fatvegan.com/2008/05/23/sigur-ros/feed/
Bugs and Bugs http://fatvegan.com/2008/05/22/bugs-and-bugs/ http://fatvegan.com/2008/05/22/bugs-and-bugs/#comments Thu, 22 May 2008 02:34:17 +0000 Ryan http://fatvegan.com/?p=4183 I've been a software developer of some description for a fair while, and I've authored at least my fair share of bugs. But my new worst bug I discovered yesterday. It was in code for a published economic paper.

This is the original code:

gen w01ceil = w11ceil + (1-mrw_alpha) * pr * (1-coerc_pi01) + (1-pr)*coerc_pi10

This is the correct code:

gen w01ceil = w11ceil + (1-coerc_alpha) * pr * (1-coerc_pi01) + (1-pr)*coerc_pi10

I'm sure I originally had it right and changed it at some later point for testing. I just didn't change it back. Luckily, although the correct1 results are fairly different, they still support the point we're trying to make.

  1. "Correct" as of 22nd May 2008.
]]>
http://fatvegan.com/2008/05/22/bugs-and-bugs/feed/
Blackbox for Windows http://fatvegan.com/2008/05/21/blackbox-for-windows/ http://fatvegan.com/2008/05/21/blackbox-for-windows/#comments Wed, 21 May 2008 02:04:05 +0000 Ryan http://fatvegan.com/?p=4181 Hurray. Some silly, wonderful folk made a Blackbox for Windows called bblean. Good on you I say. Good on you indeed.

]]>
http://fatvegan.com/2008/05/21/blackbox-for-windows/feed/
Carbon Trading Market http://fatvegan.com/2008/05/20/carbon-trading-market/ http://fatvegan.com/2008/05/20/carbon-trading-market/#comments Mon, 19 May 2008 22:33:20 +0000 Ryan http://fatvegan.com/?p=4180 It seems that the carbon trading market in Australia finally kicked off today. Prices started at $19/tonne, but that's not really based on anything in particular.

The first trade was between AGL and Westpac for 1 unit of carbon (which is 10,000 tonnes). Australia emits 603 million tonnes a year according to SMH, so those traders were really just doing it for the fun of it. I interested in working out how much more my life would cost if my carbon was offset, or if I chose to buy some share of a fixed amount that we decided was OK for the plant. AGL reckons the price could rise to $50/tonne by 2020, which is a much more interesting number to me. The price will rise because it will get harder and harder to reduce emissions as we take advantage of the cheap technologies and have to start using more expensive ones.

Last year I took two short flights and two long flights. AGL reckons that emitted 4.5 tonnes of carbon, but GreenFleet reckons that total impact on the atmosphere is more like emitting 12 tonnes. Those flights cost about $1200. If I added the cost of buying the rights to emit the carbon I produce it would cost $50 * 12 tonnes = $600. Which is a fair whack. So I'm inclined to conclude that I should probably stop flying. Or perhaps only fly for funerals of nuclear family members perhaps. I think I should commit to offsetting my flight emissions if I do decide to fly.

I'm also happy I ride a bike.

And green power is the bomb. It is so easy and so cheap, and you can reduce your emissions by a heap. If we didn't have green power, the Enmore house's carbon emissions from energy would have walloped my flight emissions. So everyone should get green power.

]]>
http://fatvegan.com/2008/05/20/carbon-trading-market/feed/
2007 Carbon Footprint http://fatvegan.com/2008/05/20/2007-carbon-footprint/ http://fatvegan.com/2008/05/20/2007-carbon-footprint/#comments Mon, 19 May 2008 22:04:40 +0000 Ryan http://fatvegan.com/2008/05/20/2007-carbon-footprint/ 2007 Carbon Footprint

I did the AGL carbon calculator based on my emissions last year. The road trip would add a lot to that this year. Driving the diesel 4WD around Australia created almost 5 tonnes of carbon.

But flying is the real problem. I should stop.

]]>
http://fatvegan.com/2008/05/20/2007-carbon-footprint/feed/
Rails autocasting date strings with wrong day month order http://fatvegan.com/2008/05/13/rails-autocasting-date-strings-with-wrong-day-month-order/ http://fatvegan.com/2008/05/13/rails-autocasting-date-strings-with-wrong-day-month-order/#comments Tue, 13 May 2008 00:57:46 +0000 Ryan http://fatvegan.com/2008/05/13/rails-autocasting-date-strings-with-wrong-day-month-order/ Update: I found a better solution that changes the date parsing code instead.

# Overrides the default AR date casting for dates of format dd/mm/yyyy
module ActiveRecord
  module ConnectionAdapters #:nodoc:
    class Column
      def self.fallback_string_to_date(string)
        string.gsub!(/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/, '\3-\2-\1') # Convert to unambiguous date
        new_date *ParseDate.parsedate(string)[0..2]
      end
    end
  end
end

Rails ActiveRecord (or ParseDate at least) assumes that date strings with forward slashes are always in the form mm/dd/yyyy. That's all very well for silly countries like America, but not for a lot of the rest of the world.

This is my fairly shite attempt to transparently solve this problem. If you put this code in lib/autocast_date.rb for instance you can go require 'autocast_date' at the top of any model that needs it.

This will obviously break support for American style dates.

]]>
http://fatvegan.com/2008/05/13/rails-autocasting-date-strings-with-wrong-day-month-order/feed/
Changing human attribute labels in Rails validation messages http://fatvegan.com/2008/05/13/changing-human-attribute-labels-in-rails-validation-messages/ http://fatvegan.com/2008/05/13/changing-human-attribute-labels-in-rails-validation-messages/#comments Tue, 13 May 2008 00:43:19 +0000 Ryan http://fatvegan.com/2008/05/13/changing-human-attribute-labels-in-rails-validation-messages/ I've been frustrated by the lack of humanity in Rails so-called human names. So I wrote a little library, which was largely stolen from Change displayed column name in Rails validation messages. The library lets you do something a little like this...

require 'human_attributes'

class Puppy < ActiveRecord::Base
  humanize_attributes :breakfast => "Puppy's preferred breakfast"
  validates_presence_of :breakfast
end

It doesn't do anything very spectacular, but it took me a long time to work out.

# lib/human_attributes.rb

module ActiveRecord
  class Base
    # Humanize attributes
    def self.human_attribute_name(attr)
      @humanized_attributes ||= {}
      @humanized_attributes[attr.to_sym] || attr.humanize
    end

    def self.humanize_attributes(*args)
      @humanized_attributes = *args
    end
  end
end

ActiveRecord::Base#humanattributename is deprecated and will be replaced by proper string inflection. For those with fancy, modern humanizing Inflectors you might have to change it to something like this.

def self.humanize_attributes(*args)
  humanized_attributes = *args
  Inflector.inflections do |inflect|
    humanized_attributes.each do |attr, label|
      inflect.human attr.to_s, label
    end
  end
end

Although I couldn't get that to work, probably because my Rails isn't new enough.

]]>
http://fatvegan.com/2008/05/13/changing-human-attribute-labels-in-rails-validation-messages/feed/
Hostel http://fatvegan.com/2008/05/11/hostel/ http://fatvegan.com/2008/05/11/hostel/#comments Sun, 11 May 2008 09:36:36 +0000 Ryan http://fatvegan.com/2008/05/11/hostel/ I thought Hostel was meant to be good, so I made myself sit through it. It wasn't very good, or interesting, or even very scary. Bits of it were kind of gross I suppose, but that's all you could really say.

]]>
http://fatvegan.com/2008/05/11/hostel/feed/
Giant House http://fatvegan.com/2008/05/04/giant-house/ http://fatvegan.com/2008/05/04/giant-house/#comments Sun, 04 May 2008 12:44:19 +0000 Ryan http://fatvegan.com/2008/05/04/giant-house/ Giant House!

This house was very big. Perhaps not oversized compared to the average house, but most definitely oversized compared to the average house you see scooting along at 100km/h on the back of a truck.

]]>
http://fatvegan.com/2008/05/04/giant-house/feed/
Quiet Centre http://fatvegan.com/2008/05/04/quiet-centre/ http://fatvegan.com/2008/05/04/quiet-centre/#comments Sun, 04 May 2008 08:00:59 +0000 Ryan http://fatvegan.com/2008/05/04/quiet-centre/ Quiet Centre

]]>
http://fatvegan.com/2008/05/04/quiet-centre/feed/
Final Road Trip Route http://fatvegan.com/2008/05/03/final-road-trip-route/ http://fatvegan.com/2008/05/03/final-road-trip-route/#comments Sat, 03 May 2008 03:41:30 +0000 Ryan http://fatvegan.com/2008/05/03/final-road-trip-route/ Final Road Trip Route

This is the final route the intrepid road trippers ultimately tripped. It was a mighty fine adventure.

It was 7,371km according to Google but the trip meter reckons we drove about 9,700km (including the optional detour to Uluru).

]]>
http://fatvegan.com/2008/05/03/final-road-trip-route/feed/
Sydney Riding http://fatvegan.com/2008/04/10/sydney-riding/ http://fatvegan.com/2008/04/10/sydney-riding/#comments Thu, 10 Apr 2008 13:19:14 +0000 Ryan http://fatvegan.com/2008/04/10/sydney-riding/ Sydney Riding

I am pretty tired. I rode 37km. I suppose it isn't so far, but you have to remember that I'm kind of a pansy.

]]>
http://fatvegan.com/2008/04/10/sydney-riding/feed/
Spare Change http://fatvegan.com/2008/04/08/spare-change/ http://fatvegan.com/2008/04/08/spare-change/#comments Mon, 07 Apr 2008 20:58:46 +0000 Ryan http://fatvegan.com/2008/04/08/spare-change/ Lately, when people ask me for money, I've been trying to give them more than they've asked for. Usually twice as much. People rarely ask for a lot, so giving twice as much is usually pretty easy out of an average pocket-worth of change.

I think maybe I'll try do that more deliberately. I'm looking for some signal to people that the change isn't begrudged. You could just smile at someone and say "You're welcome". But as I come from an economic tradition I have a bias towards signals that are costly to fake. This signal certainly isn't in the costliness order of Les Miserables, but I suppose that's where the thought comes from.

]]>
http://fatvegan.com/2008/04/08/spare-change/feed/
Mystery Men http://fatvegan.com/2008/04/08/mystery-men/ http://fatvegan.com/2008/04/08/mystery-men/#comments Mon, 07 Apr 2008 20:51:07 +0000 Ryan http://fatvegan.com/2008/04/08/mystery-men/ Was very funny. Although I slept through possibly half of it.

]]>
http://fatvegan.com/2008/04/08/mystery-men/feed/
Beowulf http://fatvegan.com/2008/04/08/beowulf/ http://fatvegan.com/2008/04/08/beowulf/#comments Mon, 07 Apr 2008 20:48:38 +0000 Ryan http://fatvegan.com/2008/04/08/beowulf/ Beowulf was winner. Good battles and fun mythology. They even threw in a dragon at the end. I like Ray Winstone too. And I love Crispin Glover, who did an awesome job of Grendel... except for one part where he possibly whined a little too much while he slaughtered villagers. I felt like it should have been more of a growl. Even a frustrated whinge would have been OK. But this was a self-pitying whinge, and it didn't fit in with head-munching.

]]>
http://fatvegan.com/2008/04/08/beowulf/feed/