Archive for the 'apple' Category

24th May 2007

/status

It’s been almost 2 months since my last post, so I thought I’d make a status update on what I’ve been up to.

I finished my 4th year of my program, with one more to go. Next year I’m going to get to take some awesome courses, included another Advanced Artificial Intelligence course and more importantly, my final project / research project. I’m still not sure what I’m going to do for that. Being partial to Mac OS X, I’d like to do something that I could write a nice Cocoa interface for. I’m kind interested in doing something with OCR (Wouldn’t it be great to break all those stupid captcha image fields?), AI, Neural Nets, or HCI (Mmm, pie menus). If you have suggestions please let me know.

This summer is shaping up to be pretty awesome. Although my Google Summer of Code application to write unit tests for Adium was accepted, I had to turn it down as I was offered an internship with Apple. As honoured as I would be to get a chance to work with the Adium team, the opportunity to work at “the mothership” is one of that no CS student can turn down. It is certainly a huge opportunity for me, and I hope to do my best to impress, learn and produce at Apple. That being said, I’m taking off for Cupertino, CA, on Sunday. I’m very excited to meet all the other interns and start work.

Further, I’ve also been lucky enough to receive a WWDC Scholarship. I don’t know how much of the conference I’ll be able to attend while working, but I’ll certainly be around. It sounds like a couple members of the Adium team are going to be there, so if a meet-up happens, you can count on me to get some photos. :)

That’s all for now, more updates to follow.

Posted by Posted by patrick under Filed under Summerofcode, apple, me, meta, school, wwdc Comments No Comments »

06th Apr 2007

Report-an-Apple-Bug Friday! 1

My first! I’m so excited.

Title: NSCalendarDate’s descriptionWithCalendarFormat method doesn’t work properly
Product: Mac OS X
Version: 10.4.9
Classification: Other Bug
Is it Reproducible?: Always

Summary:
When using NSCalendarDate’s descriptionWithCalendarFormat method, incorrect values are returned.

Steps to Reproduce:
1. Create a Cocoa app. Use the following code it in:

NSCalendarDate *time = [NSCalendarDate calendarDate];

NSString *timeOfDay = [time descriptionWithCalendarFormat:@”%X”];
NSString *dayName = [time descriptionWithCalendarFormat:@”%A”];

NSLog(@”Today is %@, and the time is %@.”, dayName, timeOfDay”);

Expected Results:
The app should print “Today is Friday, and the time is 11:02 PM.” (Assuming it actually is Friday at 11:02PM, and those your time formats are the same.)

Actual Results:
The app prints “Today is Friday, and the time is 23:02:23 Canada/Eastern.”, which is not how the time should look according to the documentation for %X. If you use descriptionWithCalendarFormat:@”%X” locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation], the output is not much better: “Today is Friday, and the time is Friday, April 6, 2007 11:08:51 PM Canada/Eastern”.

The dates and times programming guide states that %X should return “time using the time representation for the locale”. This is obviously not happening.

Regression:
Always occurs. Other regressions unknown.

Notes:
No Known work arounds, other than specifying the time format explicitly (@”%1I:%M %p”) which is ugly and doesn’t take into account localized formats.

Posted by Posted by patrick under Filed under AppleBugFriday, apple, cocoa, code Comments No Comments »

26th Feb 2007

Fun things to do with your old PPC iBook or PowerBook

Apple’s transition from the PowerPC architecture to the x86 architecture is going rather well. All their machines are now intel-based, and have been for about half a year. Lots of people have already made the switch: 3/5ths of my family, myself, my dad and now my brother, are such people. This is in line with Adium’s usage metrics, which show that a bit over half of it’s users are now running Intel machines. My brother recently decided to pack up and move to China (WTF?) and in doing so bought an Intel Mac Mini to replace his not-too-old, 1.33Ghz 12-inch iBook G4. He was nice enough to let me, um, hold on to it, while he is off in the land of the rising sun far east.

With my recent purchase of a Core 2 Duo Macbook Pro (Thanks, ADC Student Discount!), I didn’t really have a huge need for it, but being a geek I of course jumped at the chance of picking up another computer. But, what to do with it?

At first I thought I’d install FreeBSD. A lot of my friends use some linux variant, but I recently read a cool essay on FreeBSD vs. Linux and decided I wanted to try out FreeBSD. Unfortunately, driver support for Apple machines isn’t exactly stellar in FreeBSD 6.2, and is missing a few little things, like you know, keyboard, trackpad, and wireless drivers. Next Idea.

Okay, fine, I’ll install Kubuntu. I’m kinda familiar with Ubuntu, and I’ve been wanting to play with it and KDE. Driver support was much better, but Linux on Apple laptops is still pretty rough around the edges. No advanced power management (no sleep), and graphical glitches in X/KDE really turned me off. I was going to install XGL/Compiz and play around, but rather than fight with it all night I just decided to do a fresh OS X install. I still wasn’t sure what I was going to use the machine for, but running Linux was never a necessity anyways.

So with a fresh OS X install, I christened the machine Spartacus. What now? Hmmm…

I’d always wanted a MythTV box, but I don’t really watch that much television, and it’d be annoying to have to set up a cable hook-up in my room and tether it to a laptop. But then I had a sweet idea: What about that Democracy TV app?

1. Democracy

I had never noticed before, but Democracy is a sweet app. I had tried it out briefly once before, but it was too heavy on ram usage and somewhat unnecessary to be have running all the time for someone like me, who then had no interest in net TV. Now that I’ve seen that there’s some good stuff out there and I have a machine I can leave running all day downloading stuff, I can tell it is going to be getting a lot of use.

If I’m going to be watching videos I’m going to need codecs, which reminded me of something else: Perian.

2. Perian

Perian is pretty much exactly what it says it is, the swiss army knife of video codecs for the mac. I don’t need to talk a lot about this, it’s just really simple and really useful. Hooray!

But now that we are talking media apps, what else is there out there? Ah yes, what about that songbird app?

3. Songbird

When I first tried Songbird when it was announced some months ago, I was totally nonplussed. “It’s just a black iTunes”. I was wrong. I’ve been using it more now, and it’s a pretty powerful app. The ability to automagically list, download, and create a playlist for all the mp3s linked to by a particular site while browsing around is awesome. It makes reading MP3 blogs so much more enjoyable. The tight integration of other features like lyric searching, wikipedia band info, and tour info make listening to music much more of an experience than a secondary, background activity. I love it, and while there are some annoyances (no minimize on command-m?!) I can’t wait for it to go 1.0. I still keep iTunes around to stream music from my main machine, but I don’t plan on using it heavily.

Was there anything else? Ah, yes.

4. Games

Wesnoth. Quinn. X-Moto. Just a few free, light games that I love to play when killing time or just to relax a bit.

That’s essentially it so far. I’ve now got a sweet little media machine that can sit beside my bed downloading music and videos (totally legally) all day that I can peruse at my leisure. It’s got some games as well to keep me amused. It’s light, it’s fast, it’s Mac OS X, it’s great.

Thanks James. ;)

Posted by Posted by patrick under Filed under *nix, apple, how-to, ibook, legacy, me, open-source, ppc Comments 1 Comment »

27th Dec 2006

Aperture With a Laptop and External Hard Drive

When I’m not doing one of the many things I usually do, I sometimes do other things. One of these things is photography. I’ve been doing it for several years now, and consider myself to be a decent amateur photographer. With a photo library of almost 10,000 6MP+ photos, and plans on it becoming larger, I have outgrown the usefulness of iPhoto. I’ve played with Adobe Lightroom quite a bit, and while I do rather like it, I decided that Aperture suited my needs much better, and was actually a purchasable product. I won’t go into a comparison of Lightroom and Aperture here, there are plenty of other people who already have, so I’ll let them tell you why Aperture is better. I want to show how you can do something I thought would have been slightly more straightforward when I began using Aperture, but wasn’t.

This is a quick guide to using Aperture most effectively on a laptop with a relatively small internal hard drive and a nice big fast external hard drive.

First off, let me explain why you would want to do this:

  • Since your internal drive is small, you typically want to save it for things you need all the time. For me, that’s my apps, my music, a few movies, and a ridiculous amount of development tools, source, and code. Like everyone, keeping as much space free as possible is a high priority – a virtue, if you will.
  • Internal laptop drives are slow. Unless you’ve sprung for a smaller drive, chance are you’re running at 5400rpm. This isn’t terrible, but it’s nothing compared to the 7200rpm or 10,000rpm desktop drives available today. With eSATA or Firewire 800 connections becoming avaliable, it may be much faster to work on an external drive than an internal one.
  • Desktop drives are freakin’ huge. This comes in handy when you start dropping 2GB worth of photos at every shoot.
  • Aperture allows you to take image previews (basically large thumbnails) of all your offline media with you, so you can still show off or look at photos that you don’t have with you, you just can’t edit or export them. This is awesome, because it means you can have a 30GB photo library you can carry with you anywhere for only about 6GB of hard drive space [tweakable]. (This was one of the big selling point of Aperture for me.)

With this in mind, let me explain the basic workflow:

  1. Images are taken in the field and immediately imported into Aperture for organization and editing.
  2. Upon getting back to the studio/office/whatever, images in Aperture are re-located to the external storage drive where more editing or organization can take place. This frees up space on the laptop for more images next time, but keeps preview of the images like all the others.
  3. The photo library is backed-up to a separate “vault” drive for backup purposes.

Simple? Great. The problem is that doing this in Aperture isn’t immediately obvious, at least it wasn’t to me, so here’s how you do it.

  1. Create a folder on your external drive where you want to store all your photos. I called mine “Photo Library”.
  2. In Aperture, select File -> Import… -> Import iPhoto Library. Choose your iPhoto Library folder, and then select “Choose…” under the “Store Files:” pop-up. Navigate to the folder to just created and hit Open. Ensure “Move Files” is selected. Under the “Subfolders” popup, choose how you would like your the folder hierarchy of your library to be built. You will probably never be interacting with the files manually, and it is important that the naming scheme be kept consistent because you will be using it every time you unload files from the laptop to the external drive. Although Aperture won’t particularly care, this has the potential to create a very messy folder hierarchy if you don’t stick to your chosen naming scheme. I chose Image Year/Month/Day since it was the same way iPhoto did it and it just Makes Sense™. You can also change the version filename if you like, but I always just leave it as is.

    Click “Choose”. Depending on the size of your iPhoto library and resolution of the images, this will take a long time. Like I said, my photo library is about 10,000 images large and I think it took about 5 hours. Aperture is doing a lot: It’s moving a ton of files to an external drive, as well as creating image previews for each file. Let it do it’s thing.

  3. Organize your photos to your heart’s content. I recommend creating projects for all the different albums, because Aperture seems to slow down the larger the project is, and by default the iPhoto import dumps all images into a single project with multiple albums.
  4. Unplug your drive. You’ll see that all your images are still there, still viewable, but marked as offline. Hooray!
  5. When you’re “out in the field” or whatever, you can import your images into a new project and under the “Store Files:” popup, select “In the Aperture Library”. This will keep the files on your laptop for now.
  6. When you get back to the office/studio, select the project you worked on out in the field. Select File -> Relocate Masters for Project…, then navigate to the folder you made in step 1. For consistency, you should use the same subfolder naming scheme you used in step 2. While you don’t necessarily have to, the folder will quickly start looking like spaghetti if you don’t, then when you have to access it manually it will be a nightmare.
  7. The masters will be moved off your internal drive, but the previews will stay. Hooray!

All it takes is the proper know-how and single command to do, so I guess in retrospect this isn’t really that complicated. Here are some things I tried that you should NOT do:

  • Don’t move your Aperture Library file (~/Pictures/Aperture Library.aplibrary) to your external drive. The next time you launch Aperture, it will just create a new empty library, and even if you do relocate the file in the Aperture preferences, you won’t be able to use any of the cool fun offline image features that make Aperture so sweet. There is no way to use Aperture with two separate Library files or something. I found this out the hard way.
  • Don’t create an alias/symbolic link from ~/Pictures/Aperture Library.aplibrary to /Volumes/ExternalDrive/Photos/Aperture Library.aplibrary (or where ever you have it). This was a great trick to use to keep the iPhoto Library on an external hard drive while keeping the other iLife apps happy, but I can’t imagine it works all that well with Aperture.

One last word about the image previews: If you go to Aperture -> Preferences… and look under the Previews heading, you can see that you can adjust the image preview quality to a certain size if you are limited on space, or prefer large-as-possible images.

So there you have it. Aperture rocks.

Posted by Posted by patrick under Filed under aperture, apple, how-to, photography Comments 3 Comments »

14th Nov 2006

SSHKeychain Universal Binary

UPDATE 3/08/07: Bart has updated SSH Keychain to 0.8 and made it a UB. Thanks Bart!

The development of SSHKeychain, my favourite little SSH key manager seems to have stalled for some reason or another. Unfortunately, their last release is a PPC build, meaning it has to run under Rosetta on all the fancy new Intel machines Apple is shipping these days. This is a pain, since it’s actually the last app wasn’t running natively one my Macbook Pro.

I’ve noticed that they actually updated the source in svn to build as a universal binary (way back in February), but never bothered rebuilding and distributing it. Luckily, since open source is really great, I checked out a fresh copy and built such a universal binary for myself. I thought I’d share the results, to make it easy for those who don’t want to install Xcode tools and build it themselves:

Download SSHKeychain r95 - Universal Binary Don’t use this! See Update!

You should really checkout and build yourself if you want to make sure it’s secure and everything, but if you trust me, this is much easier. :)

Thanks a ton to the SSHKeychain guys for doing their thing. I highly appreciate this piece of software.

Posted by Posted by patrick under Filed under apple, sshkeychain, universalbinary Comments 3 Comments »