3 more text hack projects on leverage.sourceforge.net

13 months ago, I "launched" the leverage project on sourceforge, supposed to be a place to house all the various OS X / Cocoa text manipulation hacks I've done, including my I-Search for NSTextView InputManager hack.

I haven't touched leverage since, but today I added three more projects to the SVN repository with varying appeal and usability. I also added a mailing list, leverage-discuss.

If you're interested in trying these out or working on one of these hacks, and want to ask a question, using that email list would be best, but you can also email me directly about them.

TextShape

Here's my 2004 blog post about it: "Usability and Editing Code: TextShapeView" and here's the old home page for it, with a screenshot: TextShapeView.

The code is unchanged, but it works fine on 10.4.

http://svn.sourceforge.net/viewvc/leverage/textshape/trunk/

TextStructure

A long time ago, so long I can't even find it with google, I posted somewhere about a hacked version of TexShop that had an outline view in a drawer that showed the section structure of your TeX document.

I never got that working well enough to try adding it to TexShop, but I did realize that it's something that could be useful for other kinds of text as well.

A big project, the TextStructure InputManager adds a key binding to NSTextView that pops up a window with an outline view that tries to represent the current text as an outline, using a scheme of regular expressions that mark some lines of text as "tags" with outline levels, depending on the text. It has a few regexps built in for LaTeX, ObjC, TODO & FIXME lines, and email quoting (which doesn't quite make sense).

You can also search the text for a regexp, and it will highlight the sections which contain a match.

I don't have a screenshot just yet, but I'll post about it more later.

http://svn.sourceforge.net/viewvc/leverage/textstructure/trunk/

OEM : Open in Emacs

This is a new one, and a work-in-progress. It adds a key binding to open the text of the current text view in an emacs buffer, using a temporary file and emacsclient. It currently has no way to get the text back into the text view from the file when you're done editing it in emacs, and doesn't delete the file. But it's at least partially nifty...

http://svn.sourceforge.net/viewvc/leverage/oem/trunk/

ISIM: Incremental Search in NSTextView

Not new, but it's in there too: http://svn.sourceforge.net/viewvc/leverage/isim/trunk/

FlexTime 1.0 Launches

I've been using Red Sweater software's FlexTime for a while now, and Daniel just announced version 1.0.

FlexTime is a repeating-timer program that is great for either set routines or one-off reminders. (It also has a pretty great name, don't you think?)

It's a solid program that you can use for a number of things. It fills an important niche I care about - helping you deal with your #1 work tool also being your #1 toy.

I use it to do a version of the "(10+2)*" procrastination hack that helps me get on track doing the things I need to do. It works really well, and I love that it lets me pause a routine if work is going really well.

Perhaps the best endorsement I can give it is that even though it does what I need, I am constantly thinking of things I wish it did and ways to improve. Now that I've mentioned that, I guess I'll have to schedule some time to send my list over to Daniel...

Well, time's up - back to work!

XCode 3.0

Apple's XCode 3.0 preview page is a cornucopia of new stuff that I somehow missed all day - until now.

No doubt this is the stuff that everyone at WWDC is talking about. This page represents no less than 3 or 4 really significant changes and some really nice details. Here's a hit list that I haven't seen in any of the coverage I've been looking at today:

  • Garbage Collection in ObjC. I'm curious about the details, but I'm also certain that it's a good thing. I really just think this is a no-brainer and we'll all be asking how we lived without it in a year.

  • Project Snapshots - lets you fiddle with projects and go back to a good state without involving SVN. Nice, it's like Word Versions for XCode. Handy, but a little puzzling why it seems to be duplicating version control functionality.

  • Research Assistant - A 'lightweight window' for reference and API docs. Long overdue, and sounds really handy. Basically what I asked for in a Dashboard Widget long ago.

  • DTrace for Mac OS - this is an extremely useful and powerful dynamic tracing framework from Sun - with a DSL for tracing called "D", and I'm really surprised to see it on OS X. This is nice.

  • Leveraging DTrace, XRay visualizes program behavior. I think DTrace itself is more interesting, based on my experiences with visualization of parallel program behavior and developers (generally allergic) reaction to it, but it's interesting to see Apple give it a serious try. The ability to "track UI events" sounds tantalizingly useful.

  • A new text editor - apparently it can shade text backgrounds according to scope. This could either be a non-starter or really great. I think some will love it after a while and some will hate it immediately. Which are you? Oh, it also does iChat-style popups on your breakpoints. Okay.

  • Finally, Interface Builder 3.0, where they spend a lot of time talking about some extra palletized stuff you can drop in, which is all well and good, but then they drop the boom in the last two sentences: "Interface Builder 3.0 makes localization and diffing easier. And you can include your NIBs in global refactoring tasks." Whoa! That sound you just heard? It was me from 2004, cheering them on.

Update: s/XCode/Xcode/ - thanks.

Take me to WWDC!

I can't make it in person to either WWDC or Buzz's party this year, and as a result, I'm bummed right out. But I haven't sulked, I thought of your feelings too. I came up with a way to make it seem kind of like I was there anyway. It's so crazy, it just might work:

Mike McCracken WWDC flashcards!

Just print one or all of the following pictures, and bring them with you to WWDC. They're all cropped to a 3x5 ratio, so you can tuck them into your HPDA and flash them when appropriate, like a soccer referee - I suggest the following interpretations:

Use "Morning Mike" when you need a non-verbal way to tell someone that it's just too early to discuss APIs, GUIs, or what to do now that Apple makes a free version of your only product:

Use "Confused Mike (Afternoon session)" whenever someone says something that just doesn't make sense. Whether it's their fault, or yours! Bonus points for use when you see a new abuse of the human interface guidelines. This card may also be appropriate just after seeing the amazing demo of Apple's free version of your only product:

Use "Cheers Mike" to suggest a trip to the bar, get women to pose with you, or to celebrate the continued absence of a free version of your only product. This may be the only appropriate card to sport during Buzz's can't-miss Weblogger's Party:

But remember, those are only guidelines. Be creative - my WWDC experience is in your hands!

If you take a picture with one of me, post it on flickr with the tag 'mikewwdc06' so I can see where I've been. Have fun at WWDC - to all of you and me!

Universal build of PCRE?

Dear Lazyweb, I wanted to polish up and push out a project I started more than two years ago in time for WWDC, but it requires PCRE, and I can't seem to get PCRE to build for i386 in less than twenty minutes. Does anyone know of a universal build of a recent PCRE somewhere (or good specific instructions to build one?)

Thanks,

-mike

Script Dictionary Documentation

In relation to my previous post about instant replay in QuickTime Player - The script dictionary almost looks like a program wrote the documentation. For example:

"time scale (integer, r/o) : the time scale of the movie" (uh...) and

"current time (integer) : the current time (can be set by name as well as number)" (units? what names?).

I guess it all makes sense if you understand a lot about QuickTime movies, but is that the audience for the script dictionary? I suggest not.

Developers: your script dictionary and its documentation are important user interface concerns - if you put as much consideration into the experience your users have with scripting as you do the GUI and documentation, it will create loyal power users. And they all have blogs these days, so that's free advertising too...

Instant replay in QuickTime Player

A feature I really miss from having a DVR is the '8 seconds back' button, to catch a play or repeat something funny.

Recently I've been listening to recorded interviews we've been doing of HPC developers, and updating my notes (in VoodooPad using them. Since people mumble and use jargon I don't always understand, I decided I really needed an instant replay button in QuickTime Player. It'll come in handy if I watch sports on my laptop again, too.

In order to get it, I wrote this quick AppleScript and bound it to a Quicksilver trigger. If you run it while the movie is playing, it backs up 4 seconds and keeps playing from there.

-- 4secondsback.scpt
tell application "QuickTime Player"
    set theMovie to movie 1

    set ctime to current time of theMovie
    set tscale to time scale of theMovie

    set current time of theMovie to ctime - (4 * tscale)
end tell

Update: I just realized that for transcribing interviews I also needed a 'play/pause' command that could control QuickTime Player while keeping it in the background, just as the 4secondsback script does. It's a really simple script, but since QuickTime Player lacks the convenient 'playpause' command that iTunes's scripting dictionary has, I had to do this:

tell application "QuickTime Player"
    if movie 1 is playing then
        pause movie 1
    else
        play movie 1
    end if
end tell

I have this set as a trigger for Control-Option-Space, and the 4secondsback script is control-option-'b'. This way I can listen, type, and control the recordings without leaving VoodooPad. Brilliant!

Zoomr, Yellow Tree

I've taken to carrying my camera around with me, for practice. It's lead to an unhealthy obsession with camera bags (of which there is no perfect single choice).

It's also lead to maxing out my Flickr account quickly, and I have no cash for a Pro account. So, I thought I'd try the new - Zoomr 2.0, and see what I like about it. Geotagging and Google maps integration is cool, and I like the trackbacks, but to be honest, the interface could be much cleaner. Lots of loud colors and bold text vie for attention with the photos, which should be the real focus of attention on a photo sharing site. At any rate, here's the first photo I uploaded to Zoomr, something I took while waiting for the 30 bus at UCSD:

Yellow Tree

Pacific Beach Night Photos

Last night I took my camera with me on a late-night food run. On the way back, I stopped at the end of Felspar street and took some shots of the beach scene. My favorite two are already up at Flickr, but I thought I'd expand on them a bit here.

This is the end of Crystal Pier, which houses a hotel (you can see the last of the cabins on the left). I took a bunch of these shots, playing with the sensitivity and exposure. This was the longest - at ISO 200 and f/4.0, exposed for about 10 seconds.

Even with an f/1.4 lens, it was super dark and I had to focus manually. I set the camera on a post and used a 2-second delayed shutter to keep it still and out of my shaky hands.

Crystal Pier

For comparison, here's a version taken at ISO 1600 :

Crystal Pier at ISO 1600

Even reduced in size, you can really notice the noise.

Here's a shot of a cleaning lady working at JRDN, the swank bar in the new Tower 23 hotel. Tower 23 doesn't really fit in in PB - it's way too self-conscious and preening of a place to feel natural in such a laid-back, seedy beach neighborhood. It seemed appropriate that on a Sunday night when the more relaxed established places like the PB Bar & Grill and Longboards were really hopping, JRDN was closed - looking its ghostly best.

I should have remembered that I'd set the 2-second delay before I took this shot - I had the woman framed well, hit the shutter and wondered what was going on. Luckily, she stayed in the door frame, but I could swear it was a better shot just two seconds before.

Bar cleanup

Here's another missed shot opportunity, as she ducks behind the bar just as I find the right exposure and focus. I think the color in the other one makes it better, but the angle of the bar on this one has some promise. Shot through a couple of layers of glass, and manual focus - I'm sure it could be sharper if I'd kept trying.

Bar cleanup 2

Photos, Buzz, 4th

Buzz and the TLR

Buzz Andersen was in town for the 4th of July, and we both took a few photos, up on Flickr: Buzz's San Diego Photos, and my photos of Buzz.

When I get the film back from the Yashica, I'll scan some more photos in.

In the meantime, I've been getting more into photography, so if you want the full MMC web experience, you could subscribe to a feed of my photos, which should already be part of my feedburner feed. And if you're a fellow Flickr photo nut, feel free to add me as a contact and tell me when I reach photo genius.

PS, I've been working with the Adobe Lightroom beta to process my pictures lately. I really like the focus on workflow, and the UI is very responsive on my old PowerBook G4. It does get a little slower when dealing with 6MP RAW photos, but almost never beachballs. Furthermore, single key shortcuts are priceless for a program aimed at serious users.