Archive for November, 2007

Badass pasta sauce

Sunday, November 25th, 2007

* Fresh cherry tomatoes, the sweeter the better. A shade under a kilo.
* Garlic, damn near one head.
* Olive oil, about 4 tablespoons. Perhaps 5.
* Salt, to taste but go a bit harder than you usually would.

Warm your oil until you get a good sizzle on the thinly sliced garlic and let said garlic soften, not brown, for a few minutes. Add your tomatoes (chopped in half) a few at a time so you don’t kill the heat in the oil. Once all the tomatoes are in throw in your salt to draw out the tomato juice, cook pretty hot for about 15 minutes and serve with pasta. Spaghetti is good.

It should be really sweet and fresh when you’re done, the tomato halfs are still fairly recognizable but the salt sucks the juice out and into the oil.

Mmm… this is pretty much a no-fail recipe.

Text file productivity

Sunday, November 25th, 2007

Ever since I started using *nix operating systems I’ve been a fan of text files.

When I started working as a programmer I was given lots of bugs to fix (it really is the best job, lots of problem solving and detective work). To keep track of everything I was working on I started using a text file format for day to day work:

2007/11/25: Sunday
todo:
x catch the 0807 eurostar home
x sit and idle for a while while eating toast and drinking tea
> blog about text file productivity
	x mention how all this began
	> explain my system
	. talk about TaskPaper
. go out and buy some tomatoes for a kickass pasta sauce later
. enjoy a glass of wine

As you can see Sundays are busy at gatezero HQ.

This simple text file based system works really well for listing and crossing off tasks. I just list out what I need to get done for the day preceded with ‘.’ and then as I get things done I mark it ‘x’, things underway sometimes get a ‘>’ indicator if I don’t get them finished and need to come back and remember where I am. Simple indenting (programmers love it) deals with hierachical tasks.

So what? Well, I never have to worry about licensing some new software, I can use the task lisk from any computer that has a network connection and a terminal program and I don’t really have to justify myself to you anyway. Also it is simple and just works.

But it doesn’t work really well for managing projects over time, like if I have things to do on a project that carry over into the next day. Lots of copying and pasting of text happens and that bit sucks. It works well as a To Do list but not as a project management tool.

So I’m looking for something a little better. I’ve played with OmniFocus a little, I like it but… it has some weird underlying database structure that I can’t read in vi. It is cool, don’t get me wrong… just not sold yet and they’re about to start asking real money for it.

I just downloaded TaskPaper and I quite like it so far. It is simple, like a text file… actually, it is a text file. But with a bit of Cocoa goodness on top to turn it into an OS X application. The structure:

tasks.jpg

or:

Sunday 25 November 2007:
- catch the 0807 eurostar home @done
- sit and idle for a while while eating toast and drinking tea @done
- blog about text file productivity
	- mention how all this began @done
	- explain my system
	- talk about TaskPaper
- go out and buy some tomatoes for a kickass pasta sauce later
- enjoy a glass of wine

That’s it. Pure, lovely, text.

You can then slice and dice that text by tag or focus on a single project or archive old tasks. Wonderful! Oh, and you can get VIM syntax files for the format, or Textmate. It’s all text underneath so you’re set if you want to shell into your computer and update the file from a remote location. And if the company goes belly up and there is no new version for OS XI or whatever, well, you’re all good again, you can just o back to vi.

TaskPaper is $19 and I’ll let you know if I buy it.

OMFG!!!11 Skitch does drop shadows

Thursday, November 15th, 2007
Tim’s Internet Web Log.jpg

Guardian’s 24 hours in pictures

Thursday, November 15th, 2007
24 hours in pictures | News | Guardian Unlimited-1.jpg

I really like the Guardian’s 24 hours in pictures series:

Each day they have a set of stunning images from around the world

They even have an RSS feed on that page so you can subscribe.

http://www.guardian.co.uk/news/series/24hoursinpictures

Rails: resources_controller plugin

Sunday, November 11th, 2007

Learning about this Rails plugin at the moment.

http://plugins.ardes.com/doc/resources_controller/

Quickly, it can replace the scaffolded controller code.


script/generate scaffold Page title:string body:text

then strip out all the code from app/controllers/PagesController and stick in:

resources_controller_for :pages

Yay, less code. It does more and I’ll let you know about that soon.

Edge Rails

Sunday, November 11th, 2007

Howto get an edge rails project up and running without having to “upgrade” a gem rails project:


mkdir -p my-edgey-project/vendor && \
svn co http://dev.rubyonrails.org/svn/rails/trunk my-edgey-project/vendor/rails && \
ruby my-edgey-project/vendor/rails/railties/bin/rails my-edgey-project

OS X blogging programs

Sunday, November 11th, 2007

I’ve settled on MarsEdit and Skitch.

MarsEdit doesn’t mess with the content I’m writing by adding icky WYSIWYG-HTML-supporting extraneous HTML tags all over the place like Ecto does. It wins and I spent the $10 upgrading to 2.0 from the previous version that came with NetNewsWire.

Skitch is great for screenshooting and I can use it to grab images and then resize them prior to dragging them into MarsEdit.

That pair wins. Monica seems to concur and has gone the same route.

Continuous integration for Ruby on Rails

Saturday, November 10th, 2007

CruiseControl.rb-1.jpg

I’ve installed and configured cruisecontrol.rb for SmarterFitter and so far it is super easy and makes me happy. Now, I’m only one developer so it doesn’t make much difference for me but I plan to install it at my current gig on Monday where the small company I’m working with has, for the first time (I think?) two people commiting on the codebase.

Exciting to be able to get in and get a couple of things right from the outset.

There’s some weirdness, it seems, with test/unit not returning a non-zero value for some patch levels of Ruby 1.8.6 (patch levels below 36, and perhaps it has regressed to 110) but my experiments have not shown a problem with cc.rb failing to recognise failing builds.

Now, I want Growl and/or IM notification of build status… one step at a time.

Link

Rails STI and the development environment

Saturday, November 10th, 2007

I’m using single table inheiritance (STI) to model the foods people eat and use in recipes in SF. STI is a way of representing a class and its subclasses in a single database table.

The system defines a WeightPortion is a UserPortion is a Portion and there are a couple of other subclasses too.

Rails handles this pretty well in the case that it has loaded all the subclasses into memory and worked out these relationships. In the development environment for Rails, though, it reloads class definitions for every request so you don’t have to start/stop your server everytime you make a code change. That means that Rails doesn’t always load all of the subclass definitions and that’s when you hit trouble, asking for all UserPortions wont get you all WeightPortions, the subclass, back… your finder just searches on type = ‘UserPortion’ instead of type = ‘UserPortion’ and type = ‘WeightPortion’.

You have to force Rails to read all of the subtypes by putting a require into your controller… icky:

require_dependency 'weight_portion'

I added all these to application_controller.rb so that they’re centrally managed and available everywhere.

Link to a rather dramatic/hysterical write up on the frustration this causes.

Link to another method for solving this that did nothing but crash my app but that might still be worth some investigation.

TED

Friday, November 9th, 2007

Having a somewhat open schedule for the past little while I’ve tried to make to most of the videos of TED presentations.

These videos are of 20 minute talks given by extraordinarily smart, extraordinarily well spoken individuals across a diverse range of topics.

I might recommend on a week, or so. Some of them will blow your mind.

http://www.ted.com/index.php/

Highlights: