Wednesday, 17 February 2010

My Mac can't count


Computers aren't what they used to be. They give up too early.

How many attachments in this email?


Monday, 28 December 2009

Happiness is...

... your 4 year old nephew telling you he "loves his new Nintendo DS" while you're attempting to play "Mopoly" (as he puts it) with him.

Deleting Flickr Albums from iPhoto

(or, how to live dangerously with the command line)

So when I set myself up with a Flickr account I thought - hey, now I can really integrate and publish my photos through iPhoto, since that is where they are all managed.

iPhoto really does make it easy - select some photos, click the Flickr button and away you go. Drag photos in and out of the Flickr albums and iPhoto syncs automatically with flickr.com. Great.

Apart from when you now want to disassociate the Flickr albums in iPhoto from flickr.com. Sure, you can delete the Flickr albums, but that also deletes the sets on flickr.com as well.

I'm looking for a way to delete Flickr albums from iPhoto, but leave the pictures on flickr.com intact.

There is a way through iPhoto to delete all Flickr albums associated with one account:

  1. select a Flickr album
  2. click the settings button on the toolbar
  3. click the button to remove the account
  4. now delete all Flickr albums (iPhoto will complain about username and password, but that's OK)

But to disassociate individual Flickr albums doesn't seem possible from within iPhoto without deleting the sets from flickr.com. (If there is a way, please let me know!)

So, if you want to live on the edge and feel in the mood for some hardcore SQLite command line voodoo with the risk of totally screwing up your iPhoto Library, then read on…

Of course, usual disclaimers apply from now on - I'm not responsible for you losing your cherished wedding photos or baby pictures, so don't be dumb: make a backup before you continue. Time Machine is good enough for a backup, but to be honest, just copying iPhotoMain.db will probably suffice. If you're mad enough to follow my instructions, then let us continue...

So, open a new Terminal window and enter the following commands:

$ cd "~/Pictures/iPhoto Library" (or wherever it is)
$ ls -l

You should see a file called iPhotoMain.db

$ sqlite3 iPhotoMain.db
sqlite> select primaryKey,publishServiceKey,publishedName from SqPublishedAlbum;

This lists all published albums (MobileMe, Facebook, Flickr, etc.) Make a note of the primary keys (the numbers in the first column) of the albums you want to delete. Now the dangerous bit...

sqlite> delete from SqAlbum where primaryKey in (x,y,z,…)
sqlite> delete from SqPublishedAlbum where primaryKey in (x,y,z,…)

Where x,y,z,… are the primary keys you made a note of earlier.

sqlite> .quit

Close the Terminal window and restart iPhoto. The albums you deleted should no longer be in iPhoto, but will still be on flickr.com.

If you find that iPhoto crashes when it starts, then you may have just deleted the albums from the SqPublishedAlbum table, and not from SqAlbum as well. Try the SQLite commands again. You should also delete the iPhotoMain.db-journal file as well.

The same principles probably apply for other publishing services like Facebook and MobileMe, but I've not tried this method them.

Tuesday, 3 November 2009

Sunday, 6 September 2009

Apple open-sourcing their apps?


Shirley you can't be serious? Anyone looked the examples in Snow Leopard's Developer Tools recently?

See that one called TextEdit? Yep, that's that TextEdit application you find in /Applications. The history of changes is an interesting read in README.rtf.

I wonder why they've done this? OK, so I'm pretty sure Apple aren't going to be publishing source code to all their other apps any time soon. I'm guessing it's to give other developers a look how to do things "the Apple way".

Friday, 4 September 2009


Two posts in 2 weeks? Steady on there!

Anyway, just a thought - now that Snow Leopard has OpenCL and is exploiting the power of GPU, when will we start seeing the Activity Monitor app showing GPU Usage and GPU History??

Does anyone know - are any apps installed with SL already using OpenCL?

Tuesday, 25 August 2009

Photography

This post reminds me of the episode of Red Dwarf, Me Squared, where Lister tries to find out why Rimmer's last words were "Gazpacho Soup". He finds Rimmer's diary:
January 1st: I have decided to keep a journal of my thoughts and deeds over the coming year; a daily chart of my progress through the echelons of command so that perhaps one day other aspiring officers may seek enlightenment through these pages. It is my fond hope that one day this journal will take it's place alongside Napolean's war diaries and the memories of Julius Ceasar.
Next entry - July 17th: Auntie Maggie's Birthday.
(It's November 25th, by the way - Gazpacho Soup Day.)

So, here we are, a mere 8 months since my last post. It's not Auntie Maggie's birthday (I don't have an Auntie Maggie anyway); I wanted to let my faithful readership know about my new hobby - photography.

I'm very pleased with my new Nikon D60. The D60 is getting on a bit, at about 18 months old now (in technology years, positively ancient!) but feature/quality/price trade-offs made it (in my opinion) the best option for me.

I realise buying an expensive camera won't automatically make my pictures better - it's so easy to take crap pictures with an expensive camera. I should know - I have! But with a good camera in hand, it's going to give me the impetus to get out there and practice.

So feel free to browse my photostream on flickr. Constructive criticism is welcome!

I'll add more existing pictures soon, and new ones as I take them. Visit regularly, or subscribe to my flickr RSS feed.

Enjoy.

Friday, 23 January 2009

iWork and Version Control

I've been looking at the new release of iWork '09 from Apple and it's time to bring up the subject of version control and iWork documents again, after posting about it here last year.  

Maybe Apple have listened to their customers because in this release of iWork they have changed the format of Keynote, Pages and Numbers documents. These application now save your work as single files rather than document bundles. (I'd like to think somebody at Apple read my previous article, but that may be pushing it a bit!)

This is certainly good news for those with an antiquated version control system such as CVS and Subversion which, as I mentioned before, litters your working copy with version control.  To be honest, it's good news for any VCS since having to deal with one file instead of one directory. 

At igence where I work we're in the process of transitioning to git for our version control, replacing a 6 year old CVS repository. I've been getting to know git for good few months now, and I can see even it having problems with OS X bundles, especially when it comes to merging branches, since it works at the file level and would attempt to merge the contents of the bundle and most likely make a complete hash of it.

Of course, this still hasn't addressed the issue of which applications we use, but it does bring iWork back into the debate. We even have the option of OpenOffice.org as well now; the latest version of their suite (v3) is OS X native, rather than relying on the X Window System.

Thursday, 18 December 2008

Friday, 26 September 2008

Embedded comment forms

Cool. I just found about embedding comment forms in posts.

Edit your comment settings via http://draft.blogger.com/ and you should see an extra option under Comment Form Placement - 'Embedded Below Post'.  That's all there is to it.  More details here.

If you're using your own hand crafted template, this article  describes how to update it.

Wednesday, 9 July 2008

Rant: an amount of numbers

This is my rant for the day:

It really irks me when people use the words amount and number in the wrong context.  What just fired me off this time was reading this Macworld article about iPhone orders reaching 13,000 per second. (Anyway, that sounds way too high, surely 13,000 per minute is more realistic.)

But I digress. What got me was the quote from O2 "The amount of devices will vary depending on the store...". This should of course be "The number of devices...".

Amount should be used when you are referring to a portion of a single thing. If you can't pluralise the thing, then you should always use amount.

Number should be used to signify plurality. If it makes sense that you can count the number of objects, then use number.

Some examples might help...
  • Correct: I want to buy an amount of sand.
  • Incorrect: I want to buy a number of sand.
However, what would be correct grammar (though hardly appropriate in the real world) is "I want to buy a number of sand particles". Thus, an amount of sand particles is incorrect.

And consider the following:
  • Incorrect: I want to record the amount of messages being sent.
  • Correct: I want to record the number of messages being sent.

Thank you for listening. Rant over.

I have checked, but no doubt somebody will flame me for grammatical errors in this post!

Tuesday, 10 June 2008

WWDC 2008

Well, well. Lots of exciting stuff announced at this year's WWDC 2008 Stevenote.

The new iPhone. Hmmm... a much cheaper price, 3G and GPS makes it a slightly more compelling purchase than the old iPhone. We'll have to wait and see how much the contract will cost from O2.

Snow Leopard. Interesting. One of the goals of Snow Leopard is to reduce the footprint of OS X - I guess everything shrinks in the cold, right...?

MobileMe. An upgrade to .Mac? Your very own mail server! Access mail with your Mac, and iPhone or iPod touch.

Wednesday, 7 May 2008

6-day recording with Sky+

I was watching a 2 hour programme at the weekend, then all of a sudden my Sky+ box thought I was 6 days into it!

Sunday, 20 April 2008

Separated at birth?

What do you think?

Benny from the Vatican...


And Genial Harry Grout, of HM Slade Prison...


?


Sunday, 16 March 2008

Why you should use Python

From http://docs.python.org/tut/node3.html:

"By the way, the language is named after the BBC show ``Monty Python's Flying Circus'' and has nothing to do with nasty reptiles. Making references to Monty Python skits in documentation is not only allowed, it is encouraged!"


Why? Because she's a fucking princess, that's why!

Tuesday, 11 March 2008

Spotlight is CPU hog in Leopard

There was a time on Tiger when the Spotlight indexer processes (mdimport) would run nicely in the background and relinquish CPU cycles to anything else; you would hardly know they were there.

On Leopard now,  Spotlight appears to have been completely re-written and certainly does produce search results a lot faster than Tiger, but it does so at the expense of hogging your CPU(s) in an effort to get the indexing done (which are mdworker processes now). mds is a bit of hog too.

It took about 20 minutes to install the Office update, and it started a couple of minutes just before the Time Machine backup kicked off.  Coupled with the Spotlight indexing going on in the background as well (which didn't totally calm down until about half an hour after the install finished), made for a slightly unresponsive machine for a while!

So here's a tip - don't install the Office 2008 update (12.0.1) during a Time Machine backup!  Responsiveness is reduced a tad.

I filed a bug report with Apple.

Saturday, 8 March 2008

Thursday, 7 February 2008

Operator? Get me Bugs Bunny

Ever wanted to play the Looney Tunes theme on your phone?  Dial this number: 901293645555

It works best if you can programme the number and dial it that way. 

(Probably doesn't work on mobile phones.)

I wonder what other tunes can be played?

Wednesday, 23 January 2008

Leopard? Bored now.

Leopard is old hat. It's been out for a few months now. I'm bored with it. We need to move on.

First, please take part in my poll. What do we think the next version of OS X will be called?

Secondly, does anyone have any ideas (as wacky as you like) as to what the next big features in OS X will be? We've had Fast User Switching, Exposé, Spotlight and Time Machine. What's next? What would you like to see?