Archive

Easy Mac applications with Camping

Posted on Fri 27 Oct, 2006

Imagine your own little mac os app written with the Camping framework, that you can easily share with other mac-weilding friends. It’s all possible with next to no ridiculous hacking at all!

All you need is Platypus. Set it up to create a ruby app that outputs to a text window. Click on “advanced” and select “remain running after completion”, then create the app. Take a look inside the application folder at the script it creates at the script:

YourApp/Contents/Resources/script.

Coaxing the old version of ruby supplied with mac os into running Camping and its required ge…

Continue reading → | Tagsruby, camping, programming, mac

Vim for TextMate fans

Posted on Sun 22 Oct, 2006

A text editor is the programmer’s lathe, but unlike traditional engineering we can have limitless tools. The question is: how much time do you have to learn about them all?

I’ve used vim a lot over the years, mainly because I spent a long time using Linux and it was there so I used it. The choice was obvious: vim or vi were on almost every machine I had access to, and worked excellently both locally and remotely. Once I’d learnt the basics I was set, I knew enough to get my work done.

Then I found TextMate for Mac OS. The immediacy of TextMate made it easy to get started with, and i…

Continue reading → | Tagstextmate, vim, editors | 5 comments

Rails time-saving tips

Posted on Mon 16 Oct, 2006

I’ve created quite a few Rails projects over the last year, some commercial projects, and others are applications released under Helicoid. Here’s a few things I’ve found save time and help make projects as maintainable as possible.

Named routes

You can refer to routes in your forms and links like this: document_edit_url(:id => document.id). Isn’t that much nicer than other means? It can often make code easier to understand quickly, thus helping maintainability.

To use named routes, instead of the usual map.connect directive, use map.my_name.

Migrations

I use migrations for…

Continue reading → | Tagstips, rails, programming