Monday, June 11, 2007

Alepin with Spotlight

Aha! It's liberating to know I don't have to write a Spotlight importer for Alepin. But being told something is impossible doesn't stop me from trying; I just don't get frustrated when it doesn't work.

This is a really easy two-step process.

  1. Add Alepin to the Rich Text mdimporter.
    1. Following this hint, I ran the mdimport -n -d1 command on an Alepin file to learn that it's type 'com.macchampion.alepin.alpn'.
    2. Run this command: open /System/Library/Spotlight/RichText.mdimporter/Contents/Info.plist to open the plist file with the Property List Editor. (It's a Developer application, so you will need to have installed the Developer Tools.)
    3. In Property List Editor, expand the only triangle (Root) and then the first triangles under that (CFBundleDocumentTypes, 0, LSItemContentTypes). Select the last item (mine was com.apple.webarchive) and hit the New Sibling button. That will fill in the next number and the same String class, and all you need to do is to enter com.macchampion.alepin.alpn, the type from the first step. Save. Quit.
  2. Force Spotlight to import Alepin notebooks.
    1. find ~/Documents -name "*.alpn" -exec mdimport -f {} \;
    2. That command runs finds anything within your Documents folder that ends with the file extension alpn. The mdimport command is Spotlight indexing, -f forces indexing even of what it would normally skip (and regular Spotlight indexing does skip my Alepin notebooks), and {} means on the results of the find command. Oh, and \; just signals the end of what find should execute on the results.

Now you won't get Spotlight indexing of RTFD attachments like pictures in your Alepin notebooks yet, but I'm sure you could do a forced import of those as well. You can list them with a command like find ~/Documents -name "*.alpn" -exec ls -R {} \; | grep -v "alpn\|DocumentInfo\|rtfd\|TXT.rtf\|^$" and then move on to the next idea based on those results.

Saturday, June 2, 2007

Mr. Wood

I didn't think Karston would learn that Mr. Wood was trouble until he was teenager or older. He woke up crying twice last night (yawn), so we changed his diaper to avoid a diaper leak since that's what crying usually means now. Both times I noticed that Mr. Wood had visited him recently, so he was pointing up (high chance of a leak) instead of down (only overflow leaks). So I think Karston knows Mr. Wood causes diaper leaks, and he knows he's too old for malfunctions like that, so he let us know.

Alepin mdimporter Quest

I haven't used Alepin as much since I started using Spotlight more. Off and on, I've been frustrating myself by trying to write a Spotlight importer for it. It's just a package of RTFD files! What could be easier? I thought perhaps I could piggyback on this hint and make the RichText importer do it, but that idea failed. Well, in the case of Spotlight Metadata importer vs file package of rtfd files, the user loses. The bundle is opaque to Spotlight indexing!

I do have an idea to try to get around this anyway because I'm that stubborn, but it'll need to be scripted not manual. In that case, while I'm at it, I should script adding tags to Alepin. That will make everything Spotlight happy. Or I might switch to Journler, but then everything (work and personal, two things I try to separate) have to go in the same folder. But it has Spotlight and tags, two things Alepin needs. And it's free for personal use, so I can dabble with it.

However, at least I know I have to resort to a hack instead of pounding my head against the "write your own mdimporter" wall. That should bring the frustration down on this project. And I think I hack this hack, so that cheers me up!

Friday, June 1, 2007

The Classic Slinky TV Commercial

For years, I've been searching for a classic Slinky TV commercial. I feel like the Internet has finally grown up, because this time, I found it!!! In fact, what's even more amazing, I found several versions in several places! Of course there's YouTube, but there's even the Slinky company itself!

After watching, I had to ask myself why I had been searching. Sometimes I forget why I'm climbing that mountain. However, this time I remembered why. I used to watch Ren & Stimpy with my friend Dan. That show was a real trailblazer in cartoon grossness! When we first watched the Tooth Beaver episode, Dan went to the bathroom to retch because it was just that gross. I was pretty disgusted too, but I was too busy laughing at him retching to have stomach problems of my own. Anyway, one day Dan called me out of the blue to ask if I knew where The Log Song came from. I said, Duh, Ren & Stimpy. I was told the correct answer was that The Log Song was ripping off The Slinky Song. We didn't have a TV most of the time that I was growing up, so I grew up on books. And Dan's guess was correct: I had never seen the Slinky commercial on TV, and I had never heard the jingle. The closest Dan could find for me years ago was another Slinky knock-off (R rated, though); it was pretty funny, but I wanted to see the original. And now, finally, I have!

Sunday, May 20, 2007

Road Trip

Well, the new station wagon has been on its first road trip, got its first fill-up from me, and it was great! We piled in three adults and three kids yesterday (only one unused seatbelt), put our stuff in the Yakima roof carrier, and drove to the coast. We had a very smooth ride. Since it was fully loaded with a roof carrier, I didn't expect good fuel economy, but I was pleasantly surprised to get 26.8 mpg on the trip down. We only went 24 miles in the first hour of driving down because of traffic on the under-construction interstate! Then we took the scenic tour through several small towns to see an art gallery and an aquarium. The wagon only got 25.5 mpg on the drive back, but the weather was so windy that I was steering to correct for the wind pushing us around. It's rated for 20 mpg in town and 26 mpg highway, so I think it's doing really well. Once we get a trailer hitch installed, the old wagon can go!

Wednesday, May 16, 2007

Car Quest: Done!

Oh thank goodness! Car shopping is over, and we like the end result. The initial car shopping was painful: new cars just aren't worth that price tag.

Yesterday afternoon, we bought a 2002 Mercedes E320 station wagon from a private seller, and this morning we took care of the DMV side of the house. Patty and Selma Bouvier had nothing on the hour-long line or the inconsiderate service, but that DMV trip is done thankfully. The ride is exquisite. The driver's seat may be the most comfortable yet! The features are appreciated (like center console window controls, modern Mercedes computer dashboard, sunroof, and quiet engine). The extra leg room for the second row of seats was a great improvement. This wagon has the third row seat that looks so fun for kids! So we have seat belts for seven in this wagon. (The 20-year-old wagon being replaced only has seat belts for five since it doesn't have the third-row seat.) Karston likes playing in it, too. We'll need to get a trailer hitch for this wagon as well, but we know where to have that done now. We do have more than one choice of trailer hitch brand this time, but we plan to stick with Da'Lan for the quality. Same champagne color as the old wagon, but tan interior instead of burgundy (burgundy is pretty, but tan makes it look more spacious), gas instead of diesel (diesel wagon wasn't imported then). Basically the same wagon, 15 years newer.

I'm relieved that the wagon search is over. Whew.

Thursday, May 10, 2007

Grades

I just handed in grades, so I'm thinking about, well, grades. I only had eight students this semester, and I decided that I was OK giving only A's and B's (good group of students!). I noticed an interesting pattern when I converted their grades into the final form. I'm not allowed to assign an A+ or a D-. I did want to distinguish the top score from the other grades, but without an A+, that's tough. However, graduate students here are on a different scale, H-P-L-F for High, Pass, Low, and Fail. The H is supposed to be harder to get than an A; the P is the broad side of a barn; and the L should be rare (and bad) but at least you didn't Fail. Well, the top student this semester is a graduate student, and I was very happy to assign an H.

The pattern that struck me was that all of my B's were the other graduate students in this class! Since the H is harder to get than an A, I think there's a dis-incentive to put in the extra work to get a regular A (that translates to a P) and any form of B (that also translates to a P). So I had one graduate student who aimed for the stars and earned an H, a handful of undergraduates who worked hard and earned A's and A-'s, and a handful of graduate students who worked and learned and earned all flavors of B's that became P's.

So the piece of paper I just turned in looks much more boring than the actual grade distribution. This, in turn, makes me wonder why I worked so hard on assignments and grading. I've been teaching long enough that I know how to get a reasonable spread on grades from the questions I ask. I did that this time around, but on that last piece of paper, the only one that matters, it didn't show up. If this happens again, I wonder what sort of teacher dis-incentive it will generate?