My delightful friend Jess, and her equally delightful dog (a very friendly and
well-trained 2 year old German Shepherd cross) have to move out of their house
in just 2 weeks' time, and haven’t managed to find anywhere else to live.
If they can’t find somewhere, Jess might have to give up her puppy, which would
be a tragedy of epic proportions!
Jess is looking for either:
An existing share house that’s puppy friendly
A nice person or two with whom to find a new place
If you know anyone who might have a place, or might be interested in looking
for one, please, please pass this on.
Jess’s current house is in Brunswick, and she'd love to stay in that general
area, but is open to other options at this point.
If you help Jess find somewhere, you will have her and my eternal gratitude,
and will be welcome to come and play with her puppy anytime. :)
If you can help, or know someone who can, email me (firstname.lastname@example.org) and
I’ll put you in touch.
Comments and criticisms are welcome! The Game of Life is a rich enough problem that there are many ways to tackle it. I've picked a starting point that works for me, but there are others that are equally good or better.
I'm looking for a Melbourne pairing buddy for a couple of evenings (or a day on a weekend) to help me get Machinist moving again. Ping me on Twitter if you’re interested. (I'm happy to trade some time pairing on your open source project and/or buy you a beer or three.)
Machinist hasn’t had much love from me for a while. I did a beta release in the middle of last year, and haven’t really touched it since.
I'm officially declaring the main feature of that beta release (object caching) a failure. It’s a nice theory, but the side-effects of ActiveRecord object creation are too hard to track in practice. For a while now, I've been advising people to simply turn off caching.
So the lack of activity on Machinist is a combination of me being demoralised by my abject failure to come up with a compelling beta for Machinist 2, and generally being busy with my job at Envato.
That said, we use the Machinist 2 beta on Envato’s very large codebase, and there are plenty of people out there using both Machinist 1 and 2, so it’s far from dead. A little bit of spit and polish, and it shouldn’t be hard to get things moving again!
A friend of mine is tackling his first serious Rails project, and asked me what gems or plugins I'd recommend.
I sat down to list out the gems I use regularly, and realised that the list was longer than I thought it would be, and that there were quite a few that I consider essential to any Rails project I start.
Meanwhile, services like CDBaby make it possible for musicians to record and publish their own music, rather than relying on record labels.
There’s a pattern here: the internet makes production and distribution much cheaper, and that leads to a power shift.
When physical production and distribution were the dominant costs, it was the producers who controlled the business. Now that those costs are shrinking or even disappearing, control needn’t be in the producers' hands.
The moral of the story? If you’re a writer or a musician, think carefully before putting a publisher in charge of your work. Ask yourself what it is they do for the (usually very large) cut that they take.
On April 25, the Lady Sandra, an oil rig support ship off Cairns, helped rescue 60 Afghan asylum seekers who arrived in an unseaworthy boat. The Lady Sandra’s skipper, exposed to the human side of the issue for the first time, immediately changed his views on boat people. He talks about it eloquently in an article from the Cairns Post.
Our policy of locking away asylum seekers means it’s easy not to think of them as individuals. As a group, they’re often portrayed as a threat, or as greedy people wanting to sneak into the country and take our jobs, or somehow undermine our way of life.
Think about this: What would it take to make you give up all your possessions, leave behind your home, your friends, your family? What would it take to make you risk your life by getting on a crowded, leaky boat, and try to sail half way around the world?
Would you do it because you wanted a holiday? Would you do it just because you felt you could make more money in another country? Would you do it if you were a terrorist wanting to attack a country?
No. You'd do it because you felt it was the only alternative. You'd do it because you were desperate, because you feared for your freedom, or your life.
The vast majority of asylum seekers are people just like us, trying to escape horrendous circumstances. I wish Australia’s treatment of them reflected the compassion I feel when I think about that.
Machinist, my test-data generation plugin for Rails, has just gained some features that make it useful for controller tests. You can now do things like:
test "should create post" do
post :create, :post => Post.plan
You an also call plan on ActiveRecord associations, making it easy to test nested controllers:
test "should create comment" do
post = Post.make
post :create, :post_id => post.id, :comment => post.comments.plan
assert_redirected_to post_comment_path(post, assigns(:comment))
The other day, I posted about how I was silly enough to install, on my poor, beleaguered MacBook Pro, some untrusted software containing a trojan.
Brian Krebs was kind enough to further highlight my idiocy in the Washington Post.
I don’t mind being the cautionary tale here. I know my computer security well. Hell, for a while I led the tech team for a company that builds DDoS defense systems! If anyone should have known how to avoid this mess, I should have.
The obvious lesson is: constant vigilance! Knowing your security does not automatically make you safe. Having a Mac does not automatically make you safe.
The companies that make Mac virus protection software are having fun with this of course, but I still don’t think virus protection software is needed on a Mac. My trojan didn’t get in through an email or a malicious web page; it got in through my stupidity.
I am, however, now running Little Snitch, which at least would have let me know a bit earlier that I had a problem. It’s a bit intrusive, so I'm not sure if I’ll have the patience to keep using it.
Update: Added a reference to Eric Chapweske’s blog post about the problem. Thanks to James Healy for the link.
It’s common, in Rails controllers, to create and update models straight from the params hash:
@project = Project.new(params[:project])
ActiveRecord models default to having all attributes assignable this way. As a result, unless you’re very careful with attr_protected and attr_accessible, there’s a good chance your app has security holes.
At Alien Camel, we've always run our Rails projects from
a central Subversion repository. We've recently become
Git converts, and love its
distributed development capabilities, but the centralised repository model suits
Rails deployment and we want to stick with it.
There’s plenty of documentation out there on how to convert a Subversion repo
to Git, and there’s some stuff on setting up a shared Git repo, but its not
obvious how to combine the two.
We've worked out how to do it, and successfully converted a couple of projects.
This is our recipe.
A little research and some tinkering produced this:
Imagine fearing for your life so much that you leave behind your home, your possessions, your friends, even your family. Then imagine escaping to Australia and being locked up indefinitely, or living here but being unable to feed yourself because you’re denied the right to work, receive unemployment benefits or health care. This is the reality for many asylum seekers in Australia today.
The ASRC is one of the few places that asylum seekers can turn for food, health care, legal aid, and a host of other services. They achieve amazing things on a shoe-string budget thanks to the work of 400+ dedicated volunteers.
So sponsoring me means that you’re helping asylum seekers, who've already suffered horrible things in their home countries, be treated humanely and given a fair go here.
You can sponsor me in any way you like:
A fixed amount for giving it a go
A fixed amount for finishing
Per kilometre run (so I can’t wimp out and walk)
Any weird combination of the above you can think of
A half-marathon is 21km, and I can only run about 5km at the moment, which means I'm in for a lot of pain between now and October. There’s your second good cause: causing me pain. If you can’t get behind asylum seekers, get behind that!
You’re also welcome to join the team and run yourself, either for sponsorship or just for fun.
Post a comment here, or send me an email if you’re interested, or if you have any questions.
Update: The ASRC is a registered charity, so your sponsorship is tax deductible. Just let me know if you need a tax receipt.
I've released a little plugin that lets you monkey around with the value returned by Time.now in your tests, so that you can easily test time-dependent code. This is something I use in just about every app I build, so I figured it was about time I cleaned it up and made it public.
More details and installation instructions are here.
If you’re a developer outside the U.S., and you build an app with the iPhone SDK, you can’t test it on your own iPhone or iPod Touch.
Yep, you heard right. Only U.S. developers can actually run iPhone apps that they've built.
To be able to install your app on your iPhone or iPod touch, you have to sign up to the U.S. only developer program. The only clue as to when they’re going to open it up to the rest of the world is some fine print that says: “The iPhone Developer Program will initially be available to a limited number of developers in the U.S. and will expand to other countries in the coming months.”
I can understand that Apple isn’t ready for overseas developers to distribute their apps through iTunes; there are plenty of infrastructure and legal things to sort out there. What I can’t understand is why on earth I'm not even allowed to start building and testing an app!
I've complained to Apple about this, and if you’re thinking about doing iPhone development, you should too.
At least I didn’t pre-order an iPod Touch in preparation for the SDK release, like a couple of people I know.
I've finally done a proper release of Not A Mock, my mocking and stubbing framework for RSpec. Check out the web page for all the info, and a good example showing why it’s better than old-fashioned mocking/stubbing frameworks.
I talked about this at a Melbourne Ruby Group night last year and got lots of interest, and I got a release out that a few people have played with, but I never really pushed it. Now there’s a cleaner implementation, better documentation, and a bunch of fixes.
Why? I spend way too much of my time tinkering with HTML and CSS. (Damn you, IE! Damn you to hell!) Having to do the same for my own web site was putting me off. Hopefully this super-simple version means that I will update it more often.
MacPorts makes it simple and easy to install the latest versions of all the tools you need for Rails development. It conveniently keeps them separate from the ones that come with OS X, so things that depend on the OS X versions won’t break, and you can remove them again anytime you like. This guide will walk you through the installation process.
In 2004, I took a trip to Tasmania, partly to form my own opinion about the logging of native forests there.
There’s a tourist road which runs in a big loop off the highway. It’s a nice drive through some beautiful forest, and it takes you to a reserve where you can see some of the biggest trees remaining in the state. Many of the trees here, and throughout Tasmania’s forests, are hundreds of years old.
The catch is that one end of the loop is closed off, so once you've reached the reserve, you need to turn around to get back to the highway. This, of course, is what most tourists do.
I thought I'd try out webmenu. It all looked shiny and new, with big letters and red stripes. I eagerly clicked the “What type of cuisine?” popup, and, on a whim, picked Hungarian. What delights awaited me behind the search button?
Grrr. When will interface designers learn? Never make me do a search to find out there are no results.
I'm looking for anyone who knows about wiring up offices for network and phones, and can give me an estimate of costs. If you know anyone, or know anyone who knows anyone, please refer them to me.
The building has lots of existing network points, but the cabling running to what must have been the patch panel has all been chopped off at the wall. I'm not sure if we can salvage it, give it’s two feet short and unlabelled.
It’s three floors, and we’re going to have about 80 machines to start with, so it’s a biggish setup. The deadline for the move is June 4.
I finally got around to uploading some of the better photos from my trip to Kangaroo Island in November. It was a spectacular week, and really left me wondering what on earth I'm doing living in the city.
The highlight was a weekend spent at the Pelican Lagoon Research & Wildlife Centre. Peggy and Mike, the resident researchers, are the most lovely people you could hope to meet, as were all the others taking part in the weekend with us. I now know how to radio track echidnas through the bush, and we had the incredible experience of cutting open a termite mound to catch the recently hatched goannas living inside for weighing and measuring. I can’t wait to go back.
The Ruby Quiz a little while ago was all about turtle graphics. You remember turtle graphics from school, right? Logo? Forward 20, Right 90, etc?
It turns out its pretty trivial to implement all the basic turtle graphics operations in Ruby. My crack at it came out to about 130 judiciously commented lines. The folks at Ruby Quiz were kind enough to use mine as their example solution, so you can check out the question and my solution here.
This got me thinking. Why can’t I have an interactive turtle, just like I could in Logo? So a bit of tinkering with RubyCocoa, and about 30 more lines of code and:
Type some Ruby into the box, hit the Process button, and the program executes the Ruby in the context of the Turtle object exactly as defined in the quiz.
This is a great demonstration of the powerful idea that, if you write a program in a scripting language, then having it scriptable to the lowest level is simple.
Now, to start working on the next stage of the project. Stay tuned…
Episode 2 of Craig Ambrose’s podcast series on freelancing is excellent, and relevant to those outside the Rails crowd too. Highly recommended listening.
In it he talks about how to build good work habits without the routine of an office. I've learnt a lot of the lessons in there the hard way, and am still learning some.
I find it very hard to build good habits, simply because I'm easily sidetracked. For example, I'm currently trying to get back into regular exercise again, but I can easily get to the end of the day without even thinking about it.
To help remember, I have Joe’s Goals set as my browser home page. I put things like “Go for a run” or “Start work by 9” in there, and it gives me a nice mental prod every time I open a new browser window. I also get to put nice green ticks in when I do things, and seeing how I'm doing over time is good reinforcement. (I'd prefer gold stars or elephant stamps, but nothing’s perfect.)
Finally, my favourite quote from Craig’s podcast:
“Even if you’re crippled, at least you can still code.”