Wednesday, October 15, 2008

Can't we all just get along?

Like a lot of folks these days I write all my Objective-C code, like I write my Ruby code, using TextMate instead of Xcode. Xcode has more tricks these days but they don't much up for it's deficiencies and, well, there is an argument for having one editor and knowing it well.

However I still use Xcode to manage my project files & dependencies and to build & run my code (even if I am starting to use command-line gdb because it seems more reliable that way). I find the Xcode build results easier to use than the built-in TextMate approach and Xcode knows how to manage Cocoa projects and their dependencies.

Up until now I've been writing in TextMate then switching to Xcode and hitting Cmd+B, Cmd+R, or Cmd+Y depending on whether I want to build, run, or debug. But it irked me because I would keep using Cmd+B in TextMate. To begin with this would trigger TextMate's use of xcodebuild which annoyed me and I quickly disabled that.

This morning in one of those facepalm moments it occurred to me to ask why I hadn't checked if Xcode was Applescriptable. Of course, it is.

So one script (saved as ~/Applications/BuildWithXcode.scpt) later:

tell application "Xcode"
    activate
    build
end tell
tell application "TextMate"
    activate
end tell

and I have Cmd+B bound to oscript ~/Applications/BuildWithXcode.scrpt and I'm away. Similar for run and debug:

tell application "Xcode"
    activate
    launch
end tell

TextMate and Xcode working together nicely.

Update: My run script wasn't working because I used run instead of launch. I guess the app must already have been running without me noticing. Works now though :)

15/10/2008 11:17 by Matt Mower | Permalink | comments:

Incompatible with a free country

Is there nothing this government won't do? From a BBC report:

Details of the times, dates, duration and locations of mobile phone calls, numbers called, website visited and addresses e-mailed are already stored by telecoms companies for 12 months under a voluntary agreement.

Okay I'm already pretty shocked. When did it become okay for telco's to store all this information?

Worse yet we're now going to turn this over to the government? A government that has shown, time and time again, that they cannot be trusted with our information.

I'm with Chris Huhne:

"Ministers claim the database will only be used in terrorist cases, but there is now a long list of cases, from the arrest of Walter Wolfgang for heckling at a Labour conference to the freezing of Icelandic assets, where anti-terrorism law has been used for purposes for which it was not intended."
"Our experience of the Regulation of Investigatory Powers Act suggests these powers will soon be used to spy on people's children, pets and bins.
"These proposals are incompatible with a free country and a free people."

These proposals are incompatible with a free country and a free people.

I agree that it's important to protect lives but find another way.

15/10/2008 23:14 by Matt Mower | Permalink | comments: