Mac Attack: Automatically Importing Screenshots into iPhoto

Mar 2 ‘08

Ok, so, I'm about 5 years behind the curve, even though I'm a supposed professional Web 2.0 developer, but I'm just now getting into Flickr. Also, I really like taking screenshots of interesting things using CMD+SHIFT+4 and uploading those to a "Screenshots" Flickr photoset. Here's what I wanted to do to to feed my Screenshots Flickr set: Take a screenshot and have it automatically imported into iPhoto, and then upload it from iPhoto to Flickr. Will it "Just Work?" No, it does not. See my rant here.

Save Screenshots in a Special Folder

Download Deeper. Deeper is a Mac app that let's you tweak many hidden settings for your Mac. The only one I use is customizing the name of screenshot images and the location to which they are saved. I save my screenshots in [me]/Pictures/screens/ and each one is prefixed screen.

Automatically Import into iPhoto

iPhoto cannot "watch" a folder and automatically import images dropped into it. Instead, and disappointingly, you must become a pseudo-programmer and create an Automator workflow to perform this action for you. Automator is a program that lets you create workflows to, well, automate repetitive tasks, such as importing images into iPhoto. Here's what you do:

  1. Download Deeper, mentioned above, and configure it to save your screenshots to a Folder. I chose Pictures/Screens
  2. Open iPhoto and create an album to hold your screenshots. I called it Screens, too.
  3. fire up Automator, which lives in Application/Automator and create a new Custom workflow.
  4. Add "Get Specified Finder Items" to the list and use the Add... button to add the folder where your screenshots will land when created
  5. Add "Import Files into iPhoto" and choose Existing album and Screens
  6. Save it as a Folder Action: File - Save As Plug-in... and give it a name.
  7. Choose Plug-in for: Folder Actions and Attached to Folder: screens or wherever your folder new screenshot folder resides.

Now, take a screenshot and see if iPhoto fires up and imports the image. If so, great! If not... well, maybe I messed up, maybe you did. I'm that helpful.

iPhoto Sucks

Mar 2 ‘08

It will not Just Work. Why? Mostly because iPhoto is the single worst Mac app ever written. I love my Mac. It rocks. Wouldn't give it up. But iPhoto is just about the most counterintuitive and restrictive app Apple has ever written. It does not Just Work. I could go on and on and on, and to their credit iPhoto '08 has copied many feature from Picasa, my favorite photo management app (Windows only :( ). Perhaps one day I will enumerate everything wrong with iPhoto, but right now I wont.

Why? Because I don't know. That's the thing about Just Works: it Just Works: you really don't know why. It is the principal of least astonishment: you should not be surprised by whatever happens when you use a program. It's not that you are happy, it's that you are not unhappy. With iPhoto, I am constantly astonished. When I hit the ESC key, I usually say to myself "Whoa, what was that?". Tab? Surprised. Right-click? Surprised by what is not there. Multi-select images to batch-process them? Good luck.

And integration? Not with Flickr or any other non-Apple photo site. Ordering prints? From Kodak only.

iPhoto sucks

Time Breakdown of Modern Web Design

Jan 29 ‘08

From http://www.vilain.com/web-design.html

Time Breakdown of Modern Web Design

Mac Attack: Vantec loves America, OS X 10.5 Leopard

Jan 28 ‘08

There is a fix for the Vantec Nexstar LX which will allow it to work with Leopard. To skip all of this drivel and download it, click here

My NAS drive works with Leopard! As chronicled here in my other post, Mac OS X 10.5 Leopard has well-documented issues working with network attached storage (NAS) hard drives. Namely, no worky. The drive and its top-level folders will occasionally reveal themselves in Leopard, but they incorrectly appear to be empty.

"Leopard thinks my NAS drive is empty"

Sad. After emailing Vantec USA, the manufacturer of my Nexstar LS NAS enclosure, regarding the issue, Vantec Technical Support replied that their development team is aware of the problem and is working on a new firmware to resolve this issue:

Our development team is aware of the problem and is working on a new firmware to resolve this issue.

Cool, but, you know... we'll see. I'm a rather jaded person when it comes to promises from tech support when they are too far away for me to walk over to and hand them a bottle of Wild Turkey as motivation to fix my problem. But, then again, I did get an email, and they do have a history of blowing my mind by actually helping me. Start the flashback machine an delay the satisfying ending to this story!

The Little Tapeworm

In 2005 I bought a Vantec hard drive enclosure -- not a NAS, just a regular ol' external enclosure. While swapping drives in and out of the thing the IDE cable shredded.

"Shredded little bitty IDE cable"

Where was I going to find a little bitty cable like that? I had about 10 full-sized cables, but the would not fit inside the enclosure, monster tapeworms that they were. So I thought, what the hell --- I'll just ask them to send me a new one.

Me:

Several days ago I bought a NexStar 2 HDD Enclosure (Model NST-355U2). Despite very gentle and careful handling, the ATA cable ripped apart and the connections on one end broke into several pieces while I was removing a hard drive from the enclosure.

Please send a replacement ATA cable to: (My address)

And 2 days later, from Vantec:

Joseph, your replacement cable was mailed out today via USPS.

BUWAAAAAAAAAAAAAA? No way. But yes way! The cute little thing arrived a couple of days later. Amazing -- actual human contact, and solutions!

The Fix

Flashback over -- back to the NAS drive. Three days ago I a received the following email from Vantec Technical Support, also know as My Homie:

We just received the new firmware this morning. I'm including the new firmware with this email... Please let us know if this help in resolving the Leopard problem with our LX enclosure.

And the firmware was indeed attached. I used the Nexstar's Windows-based firmware updater (different machine), rebooted the NAS and CHA-CHING MONEY MONEY MONEY! When I mounted the drive (and I kinda want to) the NAS worked like a charm -- all of my files, including my iTunes library were finally available again.

All is not quite perfect, though. Normally a NAS drive will show up in the "Shared" area in the OS X Finder, but mine does not. I have to manually mount the drive by either hitting CMD+K or Finder -- Go -- Connect to Server... It does not show up under "Network," either. I'll let them know, but I'm a satisfied guy considering that the NAS is fixed and Vantec kept it's promise.

Here it is, the firmware. Use it at your own risk!
Vantec Nexstar LX NAS Firmware with OS X 10.5 Leopard Fix

Close the lid. Close the lid. Close the lid.

Jan 24 ‘08

Am I am old codger? A strait-up square? Maybe that's why I'm bothered so much by my current pet peeve: people working on their laptops in meeting and seminars.

Oh boy, I might make some enemies with this one. Come on, guys, you know I love ya! But you know this is good for you, you know you have a problem. Consider this an intervention. Please, repeat after me: Close the lid. Close the lid. Close the lid.

I understand: meetings suck. They're not supposed to, though. Meetings have a good heart, have good intentions, great personalities. You know all those times when you say "if these damn people would just get together and talk then these problems would go away?" Yeah, those are called meetings. Luckily I work at a place that has very, very few meetings, but I'm on assignment of sorts for a while and my client has meetings, and meetings, and meetings. Plus, this week we have a seminar that is teaching us all about the business side, and I really want to learn it because the business fascinates me. But, everyone has a laptop. Throughout the presentations people are clicky clicky clicking working on emails, chat, calendars, other random stuff. Surfing the web. It kills me. Yeah, I get it: you need to get your work done. But, I wonder: how much more work would get done if people paid attention in meetings and solved problems?

TomTom, Mandy, and Software That Worked With Me

Dec 17 ‘07

Today we finally decided upon a gift for my father-in-law: a GPS unit. After a bit of research we settled on the TomTom One, 3rd Edition, and on impulse we bought one for ourselves, too. Being a geeky couple, my wife and I tore into it as soon as we got it back to the car and used it for the rest of the day, listening to the "Mandy" voice direct us around the SF Bay Area. It was quite a fascinating experience. Geeky and gadget-happy as I am, I have never once used a GPS device -- I was a complete user-experience blank slate, and I am happy to report that the TomTom is extremely easy to use. And, as we drove around, something very strange happened: software worked with me, not against me.

We were driving around Oakland when, despite Mandy's ample and timely promptings, I missed a left turn. As I watched my street pass into the rear-view mirror, I felt a bit of panic: I did something wrong, I broke the rules, I failed, I violated the logic. What was Mandy going to do? Would she yell at me? Scold me? Make me feel guilty? Require me to flip a nasty U-turn to appease her? Based on my usage of software, and knowing how I've coded software myself, that's what I expected. Password invalid! Username not on record! Field required! You 'freakin idiot, why didn't you accept the privacy agreement?!?! You missed that turn, dumbass!

But despite missing the turn, Mandy did not berate me with my failure: the TomTom briefly stated that it was "recalculating route," updated my path on the map, and Mandy said that I should take the next right-hand turn. And I was shocked, shocked I say, at this turn of events. The TomTom's software actually worked with me, rather than forcing me to work with it. Missed the turn? No problem! Mandy's fine with that... hey, in fact, maybe you're way's better, Joe, great idea! Left turns suck anyway. The software could have easily ruined the experience with the smallest indication of disappointment: a beep, a ding, a buzz, a flash of red... but "recalculating route" is just fine to me.

How can we apply this working-with-you idea to traditional software? Unlike the streets of Oakland, most software deviations result in dead ends, not scenic routes. If you don't log in, you can't see your bank account balance, and passwords really are required. I would really like to consider TomTom's happy-to-adjust-its-expectations approach in other software design situations that might be more flexible. Google does this successfully: Search for "tommtomm" and Google asks "Did you mean: tomtom". Well, yeah, I did, thanks!

Google search for tommtomm

Google is also my spellchecker, too, happily suggesting corrections to my butchering attempts to spell.

There are examples of software that seems like it's trying to work with me, but it's not. Instead, it's guessing what I want to do, and guessing wrong. Like that annoying guy who is always interrupting you to finish your sentences... incorrectly. My favorite example of this is "auto completion," a feature curse to software as diverse as Microsoft Word to the program I'm using to write this blog post, TextMate. Try wring up a lab report Chem 115 using the symbol for calaries, (c): you'll get © instead. Nice try, Microsoft, but no ©igar. Software development tools are the worst, especially when typing operators and symbols used often while coding, such as ', ", {, [, and (, which are "helpfully" expanded to be ' ', " ", [ ], { }, and ( ). It seems like that should help programmers type less, but I have yet to meet one that actually likes this feature. It has something to do with the lack of control -- we're writing the code, thank you very much, and when we're done defining that Hash, we'll type the ending } ourselves. Other code-completion actions require the programmer to "ask" for them by hitting a magic key combo, such as CTRL+Space, but not those damn symbols. Oh well, nothing''s ""perfect.""

Thoughts on Linus Torvalds's Git Talk

Dec 11 ‘07

At Pivotal Labs last week we watched Linus Torvald's Google talk about Git, the Source Code Management (SCM) system he wrote and uses to manage the Linux kernel code.

I've watched it twice now and here are some thoughts, based on quotes and themes from the video.

"I Never Care About Just One File"

Linus stated that one of the reasons Git was wonderful for him is that, as a high level code maintainer, he needs to merge thousands of files at once. In fact, he stated that he never cares about just one file.

Not so for me. As an in-the-trenches developer, my whole life is caring about just one file, over and over again. When I merge, I care about each file because, since I work on small teams and with small codebases, there is a fairly high likelihood that my changes will collide with those from another developer.

"The Repository Must Be Decentralized.... You Must Have a Network of Trust"

Linus made the point that central repositories suck for large projects where the morons must not have commit access -- only the super privileged are allowed to commit code back to the repo. He argues that Git is better because it is a decentralized network of repositories -- there is no central master, only Some Dudes who have repositories. Usually there is Some Dude In Charge, like Linus, and everyone tends to pull code from them. To update the "master" code version, Some Dude In Charge pulls code from the repositories owned by Some Other Wicked Smart Dudes, who have most likely pulled code from Some Other Trusted Dudes (And One Gal), and so on. Thus, rather than limit access to just the hand-selected few, everyone has their own local copy of the repository, and the smart merge from the smart who merge from the smart, resulting in some kind of official or de facto version.

While I like the local copy of the repo idea, Pivotal does not work the way Linus describes... but Pivotal is weird, in a good way. We all have full commit rights. Our network of trust is everyone. The Dude In Charge is named Continuous Integration. CI makes the official versions. CI runs the tests. CI makes sure that the deploy process works. I'm sure that we could coerce Git into working in a centralized-like way, where it merges automatically from the individual developers and runs the builds, but I'm not sure if that would be forcing a square peg into a penguin-shaped hole.

"Some Companies Use Git And Don't Even Know It"

Linus described how developers at some companies use Git on their development machines, committing their changes and merging fellow developer's changes with Git, then pushing those changes to central SVN repos. He rather mocked this, but it actually sounds like a good solution: developers merge, so use the tool that's good at that. CI machines and deploy machines love centralized master repositories, so use that for those jobs.

"It Does Not Matter How Easy It Is To Branch, Only How Easy It Is to Merge"

Well said. I never thought about that before but he is completely right. I could never put my finger on why I never branch in SVN, even though it's practically 'free' and easy to do. Now it's obvious: who cares how easy it is to branch when merging sucks? Git is supposed to make merging incredibly easy because Git is content-aware rather than just file-aware... or something like that. I'll believe it when I see it, but if Git really does make merging highly divergent branches easy then I'll give it a try.

Joe's Take

I'd like to try Git, especially if it makes branching and merging those branches as easy as Linus suggests, but I don't think that Pivotal would get as much benefit out of it as large, distributed open source projects. A 'really big' project might have 10 developers, not thousands, and all must have commit rights. Our network of trust goes like this: if you are here, we trust you; if we don't trust you, you have to leave. And the idea of having to merge directly from my fellow developers sounds like a pain in the ass... why would I want to merge from 3 separate pairs when I can pull code from the central repo and be reasonably sure (thanks to CI) that it is clean and green? Hopefully I'll be able to answer those questions soon by using Git on a project.

Comment System Fixed

Dec 2 ‘07

I recently discovered this blog had a bug: only one comment could be posted; all future comments simply would not stick. Turns out to be a tricky Mephisto + Apache + Caching + Firefox bug. I was forced to both create a .htaccess file in my home directory at Hosting Rails, with the following:

In .htaccess:


DirectorySlash Off

Comments Broken... Debugging

Dec 2 ‘07

hmmm

Mac Attack: OS X 10.5 Leopard Hates the Troops, NAS Drives

Dec 1 ‘07

Update 01/27/2008

Vantec fixed it! Check out my post about the fix.

Update 12/10/2007

Well, I'm not crazy. Apple has acknoledged that the SMB bug is real and that my bug report has been classified as a duplicate of an existing issue (#5586069, for what it's worth.) It looks like they truly are on the case.

Hello Joseph,

This is a follow up to Bug ID# 5624281. After further investigation it has been determined that this is a known issue, which is currently being investigated by engineering. This issue has been filed in our bug database under the original Bug ID# 5586069. The original bug number being used to track this duplicate issue can be found in the State column, in this format: Duplicate/OrigBug#.

If you have any additional questions related to this bug or wish to check on status of the original issue, please update this bug report or send an email to devbugs@apple.com, referencing your Bug ID# 5624281.

Thank you for submitting this bug report. We truly appreciate your assistance in helping us discover and isolate bugs.

Best Regards,

Apple Developer Connection
Worldwide Developer Relations

Update 12/03/2007 @ 13:00

Vantec, the manufacturer of my Nexstar LX NAS, has replied to my email about this issue and confirmed that the Nexstar is not completely compatible with Leopard, and they are working on new firmware to fix the problem. Thanks for the response, Vantec!!

Hi,

Our development team is aware of the problem and is working on a new firmware to resolve this issue. Currently we do not have an ETA when the new firmware will be ready, but hopefully within the next few weeks. At the moment, our LX enclosure is not fully supported under Mac OS X 10.5. We are sorry for the inconvenience this may have caused you. If you have any further question, please don't hesitate to ask and we will do our best to answer them.

Regards,

Technical Support

Vantec Thermal Technologies


Original Post on 12/01/2007

Ok, Apple, this is getting outrageous. Seriously. I'm not kidding. Now? Nope, still not kidding. Not now, either.

After upgrading to Apple OS X 10.5 Leopard, I cannot read or write to my Vantec LX NAS drive via SMB -- I can connect to the drive, but it appears empty, even though it is full of wonderful stuff. In English, no more iTunes Library for me unless I pull my drive out of it's hiding place and plug it into my Mac.

This is a fairly well documented problem in Mac discussion forums around the world, including this Apple Discussion thread and this one in Australia's Mac Talk Forums.

Here I am connecting to my NAS's 'vault' folder Notice the processors spiking to 100% and the wireless connection is dead. I think that's NetAuthAgent crashing.

Now, my poor NAS looks empty. So Sad.

I was really disappointed that the 10.5.1 patch that came out about a month after Leopard was released did not fix this. I've finally filed an official bug report about this. I'll post updates as I get them.

Console Output

You might see this Console Output (Applications - Utilities - Console) if you have this same problem. It looks like NetAuthAgent crashes, producing com.apple.netauth.useragent[851] NetAuthAgent(851,0xb0147000) malloc: *** error for object 0x16c4e050: Non-aligned pointer being freed (2) and com.apple.netauth.useragent[851] set a breakpoint in malloc_error_break to debug.


12/1/07 10:41:39 AM com.apple.netauth.useragent[851] NetAuthAgent(851,0xb0147000) malloc: *** error for object 0x16c4e050: Non-aligned pointer being freed (2) 
12/1/07 10:41:39 AM com.apple.netauth.useragent[851] *** set a breakpoint in malloc_error_break to debug 
12/1/07 10:41:39 AM com.apple.netauth.useragent[851] NetAuthAgent(851,0xb0147000) malloc: *** error for object 0x16c4e051: Non-aligned pointer being freed 
12/1/07 10:41:39 AM com.apple.netauth.useragent[851] *** set a breakpoint in malloc_error_break to debug 
12/1/07 10:41:39 AM com.apple.netauth.useragent[851] NetAuthAgent(851,0xb0147000) malloc: *** error for object 0x16c4e052: Non-aligned pointer being freed 
12/1/07 10:41:39 AM com.apple.netauth.useragent[851] *** set a breakpoint in malloc_error_break to debug 
12/1/07 10:41:39 AM com.apple.netauth.useragent[851] NetAuthAgent(851,0xb0147000) malloc: *** error for object 0x16c4e053: Non-aligned pointer being freed 
12/1/07 10:41:39 AM com.apple.netauth.useragent[851] *** set a breakpoint in malloc_error_break to debug
Powered by aintablog