nosewheelie

Technology, mountain biking, politics & music.

Archive for February, 2008

Off the Grid presentation

with one comment

Last night, Nick Partridge and I presented a talk at the local AJUG on Grid Computing:

Grid computing is a form of distributed computing that is increasing in popularity in fields that have high computation and/or data storage requirements. In the presentation we give an overview of grid computing, describe our experiences using grid tools on a real project and develop a working grid across a cluster of two nodes using GridGain, an open source grid toolkit.

Off the Grid (PDF, 2.9 MB).

I’ve also uploaded the presentation to SlideShare.

Thanks to Paul O’Keeffe we’ll also have a video of the presentation in the near future.

Written by Tom Adams

February 19th, 2008 at 9:49 am

Posted in HPC,Java

Switch off annoying Spaces Cmd-Tab behaviour

without comments

Via Gruber comes Disable Space switching on Command-Tab in 10.5.2.

defaults write com.apple.Dock workspaces-auto-swoosh -bool NO

This is fantastic news, I really don’t like this “feature” of Spaces. I can see why it’s useful for some use cases, however none of these are mine.

Written by Tom Adams

February 14th, 2008 at 12:01 pm

Posted in Mac

Setting the tone

with one comment

This morning we saw the historic apology by the Australian Government to the indigenous people who were forcibly removed by the Government, the Stolen Generation. I for one whole heartedly agree with this apology, I only wish the previous Government would have done it sooner [1]. As for compensation, I think the Government is ethically and morally obliged to compensate people for this action of forced removal.

If nothing else is achieved by this apology, it (and the opening of Federal Parliament with a traditional welcome to country) set the tone for this Government’s term. It sets the tone for unity over division, positiveness over negativeness and hope over fear (something I’m seeing parallels with in the US primaries).

May this be the first of many changes in the world for the better of all of its citizens.

[1] It’s telling that all living former Prime Ministers except John Howard were present in parliament.

Written by Tom Adams

February 13th, 2008 at 8:58 am

Posted in News,Politics,World

Mac OS X10.5.2 (Leopard) update addresses UI issues

without comments

While I’m yet to install it on either of the Macs I use, it looks very tantalising!

Over the years, Apple periodically comes under fire for not listening to its customers—specifically, for deciding on particular features (or a lack thereof) and then sticking by its guns regardless of the reaction. Although some of this criticism is off-base, some of it is spot-on.

But Monday’s release of the Mac OS X 10.5.2 Update shows that sometimes Apple does listen, and occasionally even reverses design decisions because of user feedback. Consider some of the tweaks featured in this update to Leopard.

Source: 10.5.2 update shows Apple listens to users.

See also Ars’ 10.5.2: What’s new, pussycat (and what isn’t).

Written by Tom Adams

February 12th, 2008 at 1:06 pm

Posted in Mac

Lessig on Obama

without comments

Written by Tom Adams

February 12th, 2008 at 12:27 pm

Posted in Politics

Give away an item on Scoodi

without comments

A friend of Scoodi has posted a simple screencast showing how easy it is to give away an item on Scoodi.

Written by Tom Adams

February 12th, 2008 at 8:46 am

Posted in Environment,Ruby

Nick’s Symbol#to_proc explanation

without comments

Nick Partridge has been explaining how Ruby’s blocks work over IM. For my own future reference, here’s his take on it (also available on pastie)

numbers = %w{1.3 1.5 1.8}

puts "# 1 - standard stuff"
p numbers.map { |x| x.to_f }

puts "# 2 - passing in a proc using &"
to_f_proc = proc { |x| x.to_f }
p numbers.map(&to_f_proc)

puts "# 3 - passing in a dynamic proc"
def hax_proc method
  proc { |x| x.send(method) }
end
p numbers.map(&hax_proc(:to_f))

puts "# 4 - ruby calls to_proc on what's passed in as the block"
class ToF
  def to_proc
    proc { |x| x.send(:to_f) }
  end
end
p numbers.map(&ToF.new)

puts "# 5 - monkey patching it onto symbol"
class Symbol
  def to_proc
    proc { |x| x.send(self) }
  end
end
p numbers.map(&:to_f)

Written by Tom Adams

February 8th, 2008 at 3:24 pm

Posted in Ruby

Yes, we can

with 2 comments

For some reason, I have an unusual (for an Australian) interest in American politics. When I lived in the US I witnessed the farce that was the last presidential election (swift boats anyone?), but based on the reporting we’re seeing here, have higher hopes for this upcoming race.

I’ve been sitting on the fence with relation to the Democratic candidates, but Obama comes out again and again and impresses me. Dave has just posted this video – I’m assuming it’s from the Obama campaign – of celebrities and musicians paraphrasing one of Obama’s speeches. Not that having these people lends any real credibility to him, but the video is nevertheless powerful.

Written by Tom Adams

February 8th, 2008 at 9:23 am

Posted in Politics

A debate about type systems

with one comment

Jay Fields (someone whose comments I’ve come to respect) ignites yet another debate about type systems in Static typing considered harmful.

Given a good test suite the return on investment simply does not justify the use of static typing.

In 5 years, we’ll view compilation as the weakest form of unit testing. — Stuart Halloway

Type verification provides very little confidence that an application works. The little confidence it does provide comes at the cost of being confined by the type system. Verifying types is better than testing nothing at all. But, only verifying types is insufficient for application development.

Now I don’t know a great deal about type systems [1], but I know enough to know that the arguments going around appear to have been formed without knowing a great deal about type theory and what a good type system can do (I’ve heard it called arguing in a bubble).

Phillip Calçado takes it further in Static Types for Long Feedback Cycles?, noting that there has been a debate amongst ThoughtWorkers about this issue. I feel that Phillip also draws some invalid conclusions, such as asserting that a type system cannot ensure that a class fulfils its contract [2]. One of his commentors, David, makes the same comments that I’m making, that a lot of this debate stems from a lack of knowledge about what a type system actually is, talking about more advanced type systems that those we may be used to in our day jobs:

Of course I’m not talking about shonky rubbish like Java or C#’s type system but rather languages which have Hindley-Milner style type systems with inference like Haskell, ML and what not.

For a more reasoned post about this see Ricky Clarkson’s Stop Sitting On The Type Fence. The post is getting a bit old now, and Ricky’s been active in the Scala community, so I’m not sure if he still holds all these views.

My take on all this is that it’s possible to have your cake (static typing) and eat it too (all the goodness that dynamically typed languages provide). To take Scala as an example (Haskell would be better, but my knowledge of it is limited), you get static typing with type inferencing (albeit moderately weak ATM), so a lot of boilerplate goes away. You also get flexibility in the language, so you can write funky DSL style code till your heart’s content. The only thing you don’t have in Scala (as compared to Ruby) is decent metaprogramming, though I’m told there’s work in progress on this front.

For those that want to explore this a bit more, see What To Know Before Debating Type Systems and Types and Programming Languages.

[1] I know enough about type systems to be dangerous.
[2] Actually this is probably technically true, you’d need a theorem prover to do this, and potential need to solve the halting problem, but, we can get closer in practice than say Java’s type system.

Written by Tom Adams

February 7th, 2008 at 1:53 pm

Posted in Languages

Either to be added to the core Scala library

without comments

Tony has got his first patch (almost) accepted into the core Scala libraries, see the enhancement request and the current code.

Amongst other things, this comes out of work Tony and Alex have been doing on a commercial Scala project and also appears in Scalaz. Hopefully we’ll see more code move its way out of Scalaz into the Scala core.

Written by Tom Adams

February 6th, 2008 at 2:21 pm

Posted in Scala