The Quality Without A Name

2009/05/17

Kindle typography goes craptacular

Filed under: Uncategorized — mayoff @ 11:03 pm

I have a Kindle 2. The built-in font used for book text is apparently Caecilia. I scanned my Kindle displaying a page of Cryptonomicon at the smallest font size. Here’s a picture that is actual size if you have a 96 dpi display. Click on it for a 600 dpi image.
96 dpi picture of Kindle displaying Cryptonomicon

Now I’m reading Power, Sex, Suicide: Mitochondria and the Meaning of Life on my Kindle. Here’s what it looks like.
96 dpi image of Kindle displaying Sex, Power, Suicide

Notice how the crossbar on the first character, a capital T, is barely visible? The Kindle is displaying five capital Ts on that page. Here they are.
600 dpi image of Kindle displaying capital Ts

Maybe some of the screen pixels don’t work as well as others, and that’s why the Ts are inconsistent. Nope. You can shift the location of that first T around the screen (using Go to Location… in the menu), and it always looks like that. Here’s what those Ts look like at the largest font size.
600 dpi image of Kindle displaying Ts at largest font size

The answer seems to be that the Kindle is displaying those Ts differently on purpose. While investigating this, I found out that Amazon invented a new ebook format called Topaz that allows embedded fonts. Cryptonomicon uses the older format and the built-in font. Power, Sex, Suicide uses the Topaz format and has an embedded font. I don’t know if the embedded font has several versions of each glyph, or if the software for displaying Topaz-embedded fonts is responsible.

Of course, it’s not just Ts. In this book, the Kindle seems to have two or more ways of displaying every glyph, so stroke weight varies at random all over the page, and lots of strokes almost entirely disappear. It really makes the book much less pleasant to read.

2009/05/13

How to ship a used CD

Filed under: Uncategorized — mayoff @ 11:51 pm

I ordered a used copy of the old game “Full Throttle” from amazon.com. Today I received this envelope:

Here’s the contents of the envelope, as I received at:

Classy!

2009/04/21

Talking to ghosts in movies these days oughtn’t be so crazy.

Filed under: Uncategorized — mayoff @ 6:44 am

We just watched Ghost Town, in which (surprise!) Bertram Pincus (the main character) can see and hear ghosts. So he talks to them and of course in various scenes he gets funny looks.

All he need do is wear a bluetooth headset. It doesn’t even have to be turned on. Everyone will just find him annoying, not nutty.

Trying to remember how to fall asleep

Filed under: Uncategorized — mayoff @ 6:39 am

Every night of late I lie awake trying to remember how to fall asleep. I go through periods where I fall asleep easily and periods where I don’t.

When I was a senior in high school, one of my friends was a Japanese foreign exchange student named Tetsuya Toyoda. He was in orchestra. I can’t remember if Tetsuya was a cellist, but he invited me to go to a performance by a cellist (with piano accompaniment). So we went to some auditorium and listened to the cellist play. Well, Tetsuya listened. I listened for a while and had a very hard time staying awake. Eventually I just gave up and went to sleep.

Maybe I can hire a cellist to play me to sleep each night. Or maybe Delia would like cello lessons.

2009/03/26

Typing ⟦ and ⟧ in Mathematica

Filed under: Uncategorized — mayoff @ 9:13 pm

Mathematica uses doubled brackets for indexing: “x[[1]]” means the first element of x.  It also supports special characters for indexing; they look like “x〚1〛“. The special characters are nice because they take less space (when displayed by Mathematica) and look quite different.

To type the special characters in Mathematica, you have to press ␛[[␛ and ␛]]␛. I found a tip for typing them more easily.  Add these lines to KeyEventTranslations.tr:

Item[KeyEvent["[", Modifiers -> {Control}],
    FrontEndExecute[{FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
        "\[LeftDoubleBracket]", After]}]],
Item[KeyEvent["]", Modifiers -> {Control}],
    FrontEndExecute[{FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
        "\[RightDoubleBracket]", After]}]],

This lets you type control-[ to insert 〚 and control-] to insert 〛.

I don’t know why Mathematica uses 〚 and 〛 (which are characters x301a and x301b from the CJK Symbols and Punctuation range) instead of ⟦ and ⟧ (which are x27e6 and x27e7 from the Miscellanous Math Symbols-A range).

2009/03/06

Sphere

Filed under: Uncategorized — mayoff @ 9:24 pm

Neal Stephenson’s Anathem:

For 3700 years, we had lived under a ban that prevented us from owning anything other than the bolt, the chord, and the sphere.

Associated Press:

All teachers have to do is ditch the classroom chair. A growing number are replacing them with exercise stability balls more associated with pilates classes than schoolroom lectures as an innovative way to improve student posture and attention.

2009/03/04

New Toy: Fujitsu ScanSnap S510M

Filed under: Uncategorized — mayoff @ 3:16 am

The Fujitsu ScanSnap S510M is fantastic.  I got mine from amazon.com for $450.88 total.

It’s a sheet-fed scanner.  This means I can only scan loose pages – if I want to scan a magazine or book page, I have to cut or rip it out first.  But since the scanner is not a flatbed with a big pane of glass, it’s small enough to keep on a corner of my desk, within arm’s reach.

It’s fast.  It scans both sides of a sheet of paper simultaneously, in color, in about three seconds.  If I have a several-page document, the automatic document feeder (ADF) feeds it pages as fast as it can scan them.  It automatically detects blank pages and doesn’t save them on my computer.

The software runs unobtrusively in the background all the time, so scanning a document is a trivial amount of work.  I just put the document in the hopper and press the “Scan” button on the scanner.  A few seconds later, I have a PDF on my computer.

Fujitsu says the S510M provides one-touch scanning to searchable PDFs.  Indeed, out of the box, the ScanSnap software will automatically run OCR (optical character recognition) on each scanned document.  The OCR program is an OEM version of Abbyy FineReader and is great at recognizing text.  However, it’s slow.  And worse, when it’s busy OCRing a document, I can’t queue up another document for it to process.

Here’s what happens.  I scan document A.  The ScanSnap software creates a PDF of document A and sends it to FineReader, which starts OCRing it.  While FineReader is busy, I scan document B.  The ScanSnap software creates a PDF of document B and sends it to FineReader, which is still busy doing OCR on document A.  FineReader presents an error message:

Abbyy FineReader busy dialog

When I click OK, FineReader continues processing document A.  It doesn’t remember that it was asked to process document B.  I have to wait until it’s done with document A before I ask it to process document B.

And like I said, the S510M is fast.  It’s very easy to scan two one-page documents in a row faster than FineReader can keep up.

That said, the S510M is still terrific.  I work around the slowness of FineReader by scanning a bunch of documents without OCRing, then dragging them all to FineReader at once.  I’ve eliminated four or five boxes of documents that I never got around to filing.  A lot of it I ended up throwing away (recycling) without scanning, but in the end I have 2349 scanned pages so far (according to Yep!).

To eliminate the pantloads of magazines that Delia has built up, I got her agreement on buying a paper stack cutter from eBay for $200.  She will go through the magazines and pick out the articles she wants to keep.  We’ll cut the spines off and scan in those articles, then recycle the magazines.  This plan came from 43folders.  I don’t know how much it will be executed.

2009/02/14

Option-⌦ in Mathematica

Filed under: Uncategorized — mayoff @ 2:31 am

Option-⌦ (that’s option-forward-delete) is the standard Mac key sequence for deleting the word to the right of the text cursor.  For some reason, Mathematica doesn’t understand that by default.

To correct this problem, edit this file:

/Applications/Mathematica.app/SystemFiles/FrontEnd/TextResources/Macintosh/KeyEventTranslations.tr

Find the line that contains the word “ForwardDelete”, and add this line after it:

Item[KeyEvent["ForwardDelete", Modifiers->{Option}], "DeleteNextWord"],

Of course you might want to make a backup of KeyEventTranslations.tr first.


2009/02/07

Mathematica Home Edition’s banner ad, revisited

Filed under: Uncategorized — mayoff @ 5:27 pm

It turns out to be very easy to remove the Mathematica Home Edition banner ad from all existing and newly-created notebooks.  Just run this expression:

SetOptions[$FrontEnd,DockedCells->{}]

The effect of this command persists when you quit and restart Mathematica.

Something else you might find annoying is the “Welcome to Mathematica 7 Home Edition” window (the Mathematica Navigator), which appears every time you start Mathematica.  You can prevent Mathematica from opening that window by running this expression:

SetOptions[$FrontEnd,AutoOpenNotebooks->{}]

2009/02/06

Mathematica Home Edition’s banner ad

Filed under: Uncategorized — mayoff @ 10:50 pm

Mathematica Home Edition includes a banner ad for itself at the top of every new notebook you create:

Mathematica Home Edition empty notebook with banner ad

How annoying.  You can remove it by evaluating this expression:

SetOptions[SelectedNotebook[],DockedCells->{}]

I haven’t figured out how to make this happen automatically in every new notebook I create.

2009/01/30

New toy: Okidata C5650dn printer

Filed under: Uncategorized — mayoff @ 12:43 am

Maybe ten years ago, I wanted a printer.  My requirements were laser, duplex, reasonably fast, Ethernet, and PostScript.  The cheapest printer that met all of these requirements was the NEC SuperScript 1800n.

A few months ago, the SuperScript stopped printing.  I was able to get by with my HP PhotoSmart 2610 all-in-one, but I missed the speed, duplexing, and text quality of the laser printer.  So I’ve had my eye out for a new laser printer.  My requirements now are almost the same as they were 10 years ago, except that I want color, and I want Mac compatibility rather than PostScript specifically.

The Okidata C5650dn seemed to be just what I wanted, for about $625 with shipping through Amazon, so I ordered it a couple of days ago.  The actual seller was Technology Galaxy.

This morning, UPS left a box on my porch.  The box said Okidata on the outside.  Unfortunately, it didn’t say C5650dn.  It said it was an option tray.

 

  I called the seller (Technology Galaxy) about it.  They were already aware that they’d shipped the wrong thing and had shipped the printer.  He gave me the UPS tracking number for the printer, which was already out for delivery on another UPS truck, and told me to give the option tray to the UPS guy when I received the printer.  He also noted my account to get a discount on my next two orders with them.

Then he called back a few minutes later and told me to just keep the option tray because apparently they get promos on those all of the time anyway.  Whee, free option tray!

So later another UPS guy came and delivered the actual printer.  It’s kind of big, especially with the second paper tray.

IMG_2582.JPG 

Making it work on the Mac took a little work.  It showed up in the Print & Fax Add Printer dialog as a Bonjour printer, but my Mac could not find a driver for it.  So I tried installing the driver from the CD-ROM that was included with the printer.  The installer told me to go to “More Printers” in the Add Printer dialog and choose “OKI TCP/IP”.  I did that.  Then I had to manually enter the printer’s IP address (which I had set manually using the printer’s front panel so I would know it).

Even after that, I could not print from the Mac to the printer.  A little web searching led me to a support page at Oki Belgium’s web site where they had Leopard-specific driver in addition to the older driver that I got from the CD-ROM.  I deleted the /Library/Printers/Okidata folder, downloaded the Leopard driver installer from Oki Belgium, and ran it.  Then I restarted System Preferences and click the Add Printer button again.  This time, when I choose the printer from the Bonjour list, it found the OKI C5650 driver.  And now I can print!

The last thing I had to do was reduce the Power Save Delay Time to 5 minutes (the default is 60 minutes), because the printer’s fan is kind of annoying even when it’s not printing.  In Power Save, the printer is silent.

2008/10/03

Keyboard for eBay users

Filed under: Uncategorized — mayoff @ 2:55 am

2008/03/07

A few bits about the iPhone SDK

Filed under: Uncategorized — mayoff @ 1:19 am

Regarding today’s release of the iPhone SDK:

  • The SDK disk image is 2.1 GB and includes Xcode 3.1 (beta).
  • Interface Builder is not supported yet.
  • You must get a crypto certificate to actually install apps on an iPhone.  You get one by joining the $99 developer program.  I have “applied” for the program but have not yet received the email allowing me to actually pay for a membership.  You can run apps in the iPhone simulator without a certificate.
  • The code for the sample applications is installed on your hard drive here: /Developer/Platforms/Aspen.platform/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiPhone2_0.iPhoneLibrary.docset/Contents/Resources/Documents/samplecode (Sorry about the ugly line-wrapping. I tried.)

2007/12/18

Telluride #1

Filed under: Uncategorized — mayoff @ 11:14 pm

A month or two ago, at a charity auction, Delia won the use of a 3 bed, 3 bath suite at the Franz Klammer Lodge in Telluride for 12/14 through 12/21 (both Fridays).We missed our 9 AM flight on 12/14 and were forced to reschedule for a 7:40 AM flight on 12/15.  Yargh.We made the Saturday flight and arrived at the lodge at about 3 PM and rushed to get in one run with our new gear.We had dinner at 9545 (a restaurant named for its elevation).  Delia went to bed as soon as we got back.  I went to bed around 10 PM (11 PM Austin time).  Our room has a Tempurpedic mattress.  I’ve never been on one before.  It was weird.

2007/11/27

Movies #9 and #10

Filed under: Uncategorized — mayoff @ 7:33 am

This post is way behind schedule.  Movie #9 was King of Kong, which was great.  Movie #10 was Blade Runner The Final Cut.  It’s been so long since I saw any other cuts that I couldn’t remember exactly what was different, other than noticing that Bryant’s explanation of the situation had been changed to account for all six replicants instead of just five as in the original cut.  Fortunately Wikipedia has a list of the changes.

2007/08/12

What Keeps Me Up At Night

Filed under: Uncategorized — mayoff @ 11:30 pm

In the movie Knocked Up, the pregnant woman and her sister try to get into a nightclub and are rejected by the bouncer, who is black.  Eventually the bouncer tells them that he’s only allowed to let in 5% black people, so for every 25 white people he lets in, he can let in one and a quarter black people.  It’s actually very funny.

While trying to remember how to fall asleep last night, I noticed that the bouncer’s math is wrong.  If he lets in 25 whites and 1.25 blacks, then he has let in a total of 26.25 people.  But 1.25/26.25 is actually a little under 4.8%.  He actually needs to let in 25 * (5% / 95%), or just over 1.3, black people to achieve 5%.  Alternatively, if he wants to let in 1.25 blacks (which is 5% of 25), then he needs to let in only 23.75 whites.

2007/08/07

Movie #8: The Simpsons Movie

Filed under: Uncategorized — mayoff @ 5:25 am

We saw The Simpsons Movie on Sunday.  Spider-pig was the funniest bit.  There were some other funny bits, but it didn’t have the humor density of a typical 30-minute episode.

Watching The Simpsons in a theater with strangers of varying ages was interesting.  The twelve-year-olds laugh loudly at all of the tired old jokes I got sick of twenty years ago.  I guess that’s why Hollywood keeps putting them in.  Many of the bits I found funniest didn’t seem to get much of a reaction from the rest of the theater.

Also, strangely, people kept wandering in to the movie for about 30 minutes after it started.  Fortunately the theater was pretty empty so they didn’t have to make a big fuss finding a seat.

2007/07/30

Movie #7: Pirates of the Caribbean: At World’s End

Filed under: Uncategorized — mayoff @ 5:32 pm

We saw Pirates of the Caribbean: At World’s End on Saturday.  I liked it.  John didn’t.  He thought the plot was too complex, and he didn’t care about the characters.  I thought the plot was just right, and although I didn’t care much about the characters either, the plot was interesting enough to make up for it.

On the other hand, we were sitting in front of some loud-mouthed retards.  We probably will not be going to the south Tinseltown again.  It seems to attract that sort of cretin.

Delia and Todd like to assign numeric ratings to movies.  I don’t think that it’s possible to assign just one rating to a movie.  The problem, as I pointed out on Saturday, is that sometimes you’re in the mood for a certain type of movie, and other times you’re not.  When you’re not in the mood, you won’t like the movie as much.  I felt vindicated on Sunday when John admitted that he might have been overly harsh about the movie because he wasn’t really in the mood for an action/adventure film on Saturday.

2007/07/20

Obligatory Presidential Cephalosphinctoral Humor

Filed under: Uncategorized — mayoff @ 6:16 pm

President Bush is having a colonoscopy tomorrow.  The doctors do not expect to find any polyps.  Just a head.

2007/07/16

Movie #6: Harry Potter and the Order of the Phoenix

Filed under: Uncategorized — mayoff @ 5:59 pm

We saw the fifth Harry Potter movie yesterday.  Some couple had brought an infant with them, and of course it cried and made noise during the movie.  Aside from that, I didn’t think it was a good movie.  Another forty minutes might have been enough to make it good.

2007/07/04

Google Maps from Mac OS X Address Book

Filed under: Uncategorized — mayoff @ 7:00 am

The Mac OS X Address Book (as of Tiger at least) makes it easy to send an address to MapQuest.  I’ve packaged a little AppleScript that sends it to Google Maps:

 googlemapof.png

Click the picture to download the script.  Put the script in your Macintosh HD:Library:Address Book Plug-Ins folder or the Library:Address Book Plug-Ins folder in your home folder.  Then restart Address Book. 

2007/07/02

Will “iPhone Leopard” cost $129 (or $600)?

Filed under: Uncategorized — mayoff @ 1:48 am

A lot of the complaints about iPhone 1.0 can be fixed in software: instant messaging, iTunes Store access, video capture, ringtones, games, Flash, more Bluetooth support, etc.  Apple probably plans to address all of those shortcomings.  I understand why they’re not already fixed; getting them all into the first version might have delayed the product launch by six months.

My question is, having spent $600 on iPhone 1.0, what will it cost me to get the new features when Apple does finish them?

I’ve owned a Treo 270, a Treo 600, and a Treo 650.  There were some firmware updates to them, but I don’t recall the updates adding any significant new features.  As far as I know (having never used a Windows Mobile-based phone), this is the norm for cellular phones: a firmware update just fixes bugs.  You only get new features by buying new hardware.

On the other hand, if I buy a Mac (or a PC), I fully expect it to last through at least one or two significant operating system upgrades.  I’ll pay for each new OS release (Mac OS X Tiger was $129), but I won’t necessarily have to buy new hardware.

Paid ringtones and access to the iTunes Store would both be revenue generators for Apple, so I expect to see those features added to iPhone 1.0 gratis.  What about the other things, like instant messaging and video capture?  Will Apple charge me $129 for an “iPhone Leopard” firmware update?   Will it just ask me to shell out another $600 for iPhone 2.0 hardware?

2007/07/01

iPhone vs. Treo 650

Filed under: Uncategorized — mayoff @ 5:56 am

The iPhone came out yesterday.  I didn’t feel it warranted waiting for hours in line, and I wasn’t sure I wanted one yet.  But I called the Apple Store (Barton Creek) today and was told that iPhones were still in stock (ha ha to all you suckers that waited in line for hours yesterday!) and I just couldn’t resist.  So now I’ve played with it for about three hours.  Here are my thoughts.

Ways the iPhone beats the Treo 650:

  • The user interface is beautiful.  The screen’s resolution is apparently slightly lower than my Treo 650’s (165 dpi vs. 178 dpi), but Apple’s interface looks so much better.  It always annoyed me that the Treo doesn’t use anti-aliased text.  The iPhone does.  This makes a huge difference.
  • It appears to sync perfectly with my Mac OS X Address Book and iCal.  My Treo (with Missing Sync) did an acceptable job of this, but not perfect, since its Contacts and Calendar schemata are a little different from those of Address Book and iCal.  The iPhone was presumably designed to work perfectly with these apps.
  • Safari works great.  It’s no faster at loading pages over the cellular network than the Treo 650, but the browser does a much better job rendering pages than Blazer (the Treo browser).
  • My iPhone plan is cheaper than my Treo plan.  I paid Verizon $105/month for the Treo (including unlimited data and no SMS messages).  I’m only paying $60/month with the iPhone, including 200 SMS messages.  (If I could get a plan with fewer airtime minutes for less money, I would.  I only use about 50-100 minutes per month.  This was a problem with the Treo too.  Nobody sells a plan with as few minutes as I need, apparently.)

Ways the Treo 650 beats the iPhone: 

  • I can’t search the iPhone’s address book by typing.  On the Treo, I just start typing a first name, or last name, or first initial plus last name, and it filters the contact list.  It usually takes no more than 2 or 3 keystrokes to isolate the person I want to find.  On the iPhone, I have to scroll and look.  Scrolling is smooth and fast, but not as fast as the Treo’s keyboard search.  As a bonus, the Treo magically figures out when I’m typing a phone number instead of searching by name.  On the iPhone I have to press the keyboard button to dial a number.  You might think this is nit-picking, and I should just use the iPhone’s “Favorites” list to store my commonly-dialed numbers.  But the Treo keyboard search was so efficient that I never needed a separate mechanism for accessing my oft-dialed numbers.
  • I can’t install my own ring tones on the iPhone.
  • The Treo can sync over Bluetooth.  The iPhone can’t.  (Nor can it sync over WiFi.)

Ways that the iPhone and the Treo 650 both suck:

  • Neither works with the Mac OS X Address Book.  The Address Book has a Bluetooth button, Address Book Bluetooth button, right in the toolbar.  Supposedly, if you pair your Mac with a cell phone, you can dial numbers on the cell phone just by clicking Address Book entries.  It doesn’t work with either the Treo or the iPhone.  In the case of the Treo, it’s annoying but understandable.  In the case of the iPhone, it’s just stupid.
  • Neither has a 3G radio.  (Newer Treos do.)

Ways in which the iPhone sucks that have nothing comparable on the Treo:

  • The iPhone can’t access the iTunes store.
  • It seems to have trouble remembering my home WiFi password, so when I leave the WiFi network and come back later, I have to re-enter it.  This doesn’t happen every time.
  • A few days ago, Google enhanced Google Maps.  Now you can change its driving directions just by dragging the route with your mouse.  It’s terrific – totally intuitive, and lightning-fast.  Want to do that on your iPhone?  You can’t.  The built-in Maps application doesn’t support it.  And if you go to maps.google.com in the iPhone web browser, you still can’t.  As soon as you click the “Search Maps” button in the web page, the iPhone takes you to the built-in Maps application.  I feel like Apple might as well have just displayed “fuck you” in inch-tall letters.
  • So far, it’s been much easier for me to type with two thumbs in the sideways orientation, but only Safari offers it.  Phone, Calendar, Maps, Notes, etc., only offer the cramped, clumsy portrait-mode keyboard.  Also, once you bring up the keyboard in Safari, you can’t then rotate the iPhone and have the keyboard change its orientation.  You have to back out of the keyboard screen and re-enter it to make it rotate.

2007/06/13

Movie Obligation #5: Knocked Up

Filed under: Uncategorized — mayoff @ 1:17 am

We saw Knocked Up on Sunday.  It was funny.  It was preceded by a preview for Run, Fat Boy, Run, which stars Simon Pegg of Shaun of the Dead and Hot Fuzz, and looks hilarious.  After perusing IMDB, I’d guess these will be the rest of my movie obligations:

  1. Pirates of the Caribbean: At World’s End (opened 2007/05/25)
  2. Ratatouille (opens 2007/06/29)
  3. Black Sheep (opens 2007/06/29; limited release)
  4. Sicko (opens 2007/06/29)
  5. Harry Potter and the Order of the Phoenix (opens 2007/07/11)

However, if Black Sheep doesn’t play in Austin, or if John doesn’t want to see some of those, these would be my next choices, assuming nothing else compelling comes out first:

  • The Simpsons Movie (opens 2007/07/27)
  • Balls of Fury (opens 2007/08/31)
  • Run, Fat Boy, Run (opens 2007/09/27)

2007/06/03

Red Right Return

Filed under: Uncategorized — mayoff @ 6:46 pm

Our bathroom (which as I have mentioned isn’t air-conditioned) became somewhat overrun by some sort of insect on Friday night. Fortunately they mostly didn’t fly, and didn’t bite. It was still pretty gross though. They mostly disappeared by Saturday morning (except for a number of dead ones on the counter).

It was once again bright, hot and muggy on Saturday. It was somewhat windier than most of the week (except Friday). The ferry ride back to Beef Island was a lot rougher than the ride to BEYC, and the flight to San Juan too. At least the flight wasn’t scheduled for departure until 2:05 PM, so we didn’t have to get up early. The flight didn’t actually leave until more like 2:30. Delia didn’t get to sit in the co-pilot’s seat this time, which is a shame because the pilot this time was a lot chattier with the guy in the co-pilot seat than the pilot on the way to Beef Island had been.

There were no wailing children near us on the flights back. Hooray! We got home at about 12:30 AM. Home again, home again, jiggity jig.

2007/06/01

I’m Only Happy When It Rains (or, Rock You Like a Hurricane Season)

Filed under: Uncategorized — mayoff @ 4:24 pm

This morning it started raining. On previous days, it rained once or twice a day, for about 15 minutes at a time. Today the rain lasted a few hours and was heavy and windy. At breakfast Tony was excited about getting out in a catamaran, but by the time he actually got under way (or “under weigh” if you prefer the nautical misspelling) the wind had died down to about the level of previous days. One of the staff told me today’s the first day of hurricane season and he expects five inches of rain. I don’t know if he meant five inches today or five inches for the whole season…

Anyway, the outdoors was a lot more tolerable during the downpour. It’s pretty much stopped raining and blowing now, but it’s still cooler and a little bit less humid than on previous days. Delia wanted to hike up the big hill today but I don’t know if that’s going to happen anymore, since it’ll be very muddy now.

Annoyingly, BYEC’s wireless router hasn’t been working well for a couple of days. For the sake of my avid readers, I’ve come out to “Saba Rock” (a bar/hotel on an island about 50 yards offshore of BYEC) where they have their own Internet connection. Delia’s in the gift shop buying overpriced whatnots for the lucky folks back home.

2007/05/28

Communication is the Key to a Successful Marriage

Filed under: Uncategorized — mayoff @ 11:30 pm

“I may have to leave tomorrow,” I said.

“Can’t you at least stay until Thursday? So you can do what you came to do?” asked Delia. She’s referring to the wedding on Wednesday.

“I came to leave. Haven’t I suffered enough?”

“You’ve suffered,” she said agreeably.

“You left off `enough’,” I said.

She said nothing.

The Black Swan

Filed under: Uncategorized — mayoff @ 11:00 pm

I suppose that everyone you’ve met (aside from me) dreams about coming to a place like BEYC, where the sun and the ocean and the weather and the sailing and the diving and the whatnot. If you’ve been, you loved it. If you know someone who’s been, he or she raved about it. That’s why you assured me (whether you’re a close friend or the merest acquaintance) that I’d have a great time.

Here’s what dinner was like tonight. We made a reservation for 8 PM and showed up right on time. We got seated in about two minutes. The place was packed. That’s not surprising; it’s the only restaurant in BEYC that serves dinner. So it took probably five minutes before our waitress made it to our table. She gave us a bread basket. Then, five minutes later, she came back and asked if we’d like a bottle of water. Five minutes later, she brought the water and asked if we want caesar salad. The salad came quickly and we took all of five minutes to eat it. The waitress, on the hand, took fifteen minutes to return, and then told us it’s a buffet tonight so we can go serve ourselves whenever we’re ready. WTF? By this time I’d picked up four more mosquito (or something) bites. Because at BEYC, the (one) restaurant is outside.

Stop the Island, I Want to Get Off

Filed under: Uncategorized — mayoff @ 10:00 pm

It’s not that I haven’t tried to have fun. Summer, Delia, and I took a sailing class yesterday. Today Tony and I each took a little catamaran out on the sound. There’s some fun to be had sailing, but (at least the way we did it) there’s a lot of boredom too. At least out in the sound there are no biting insects (at least during daylight).

You might think that at least way out here, away from the infernal noise machine*, I’d get some peace and quiet, hearing just the air conditioner and the waves. Nope. The bass line of something from down at the pub (I guess) makes it all the way up to our room.

I hate it here.

*Civilization.

2007/05/27

Paradise Is a Lack of Annoyances

Filed under: Uncategorized — mayoff @ 9:00 pm

BEYC does not qualify.

The Unbearable Wetness of Being

Filed under: Uncategorized — mayoff @ 6:20 pm

Remember when your were five or six, and you’d visit your aunt or grandmother. You didn’t really understand her relationship to you, but for some reason she’d insist on grabbing you and giving you a big kiss, or kisses, and you really did not like the closeness and just wanted to get away? That’s what the humidity here is like, but you can’t get away and it never stops.

That’s not entirely true. Fortunately, Delia booked us an air-conditioned room. In the room, it’s cool and dry.

BUT, the bathroom is not air-conditioned. It’s connected to the outside by screened shutters, so leaving the bathroom door open just lets the conditioned air leak out. So you don’t, and going to the bathroom feels like going outside. This can’t be good for my kidneys.

Not Eaten by Pirates, Alas

Filed under: Uncategorized — mayoff @ 1:00 pm

We got to bed a little before 1 AM. The birds woke us up at 5:10 AM.

At dinner last night, Summer told me that the insects on the ferry dock (see previous post) are more aggressive than the insects here at BEYC. So I opted not to put DEET on for breakfast. I got bitten twice.

2007/05/26

Bugger All

Filed under: Uncategorized — mayoff @ 11:00 pm

I was bitten thrice while waiting for the ferry to BEYC before I dug the DEET out of the suitcase. I hate spraying poison on myself, not to mention being sticky and smelly (more so than usual anyway), and (because of DEET on my hands) being unable to take out my Invisaligns to drink the fruit smoothie Delia brought me.

Why travel?

Filed under: Uncategorized — mayoff @ 8:07 pm

2007/05/26 13:09 US/Eastern

Aboard Delta 579 en route to San Juan

I have realized that kids are what make travelling worthwhile. When you have kids, there can be nothing more pleasant than to go somewhere far away, without them. Unfortunately, the family seated in front of us hasn’t figured that out. They have four kids under 5 years old. The older two appear to be twins. For the younger two they brought carseats. They were originally scattered all over the plane, and cleverly traded seats with other passengers until the parents and three of the kids were on the emergency exit row. Then they were informed that babies and car seats aren’t allowed on the emergency exit row, so they swapped with the passengers behind the emergency exit row. Then they were informed that car seats aren’t allowed on that row either, so they moved yet another row back, to the row immediately in front of us.

The little girl in the carseat in front of us has been crying for at least half an hour.

Delia’s comment: “I realized as the family moved closer and closer to our row that it would be a harbinger of the wailing and gnashing of teeth to come.”

Not-so-great Expectations

Filed under: Uncategorized — mayoff @ 3:40 am

I always have two expectations when I travel:

  1. I will be miserable.
  2. I will spend a lot of money.

I expect this trip (to the Bitter End Yacht Club, or BEYC) to be no different. In fact, I’ve been filled with a nameless dread. But I shall overcome this nameless dread. By naming it. Dread, I hereby dub thee “Crognar”.

It doesn’t help that our flight is at 7:50 AM.

I fully expect the following events:

  • Our flight out will be delayed and we’ll sit on the tarmac for two hours.
  • We will miss our connection in Atlanta.
  • The puddle-jumper from San Juan to Tortola will not have in-flight beverage service.
  • The ferry from Tortola to BEYC will have mechanical difficulties, leaving us drifting aimlessly.
  • Somehow, I will end up stranded on a tiny island, but unlike Tom Hanks, I will have no volleyball to befriend.
  • Shark attack.
  • Loss of an appendage (due to shark attack).
  • A plague of biting insects.
  • Seasickness.
  • Identity theft.

Then, on the second day, I will be killed by pirates. Actually, that may come as a relief.

In summary, goodbye cruel world.

2007/05/22

Using Xcode to build a disk image (and upload a web site)

Filed under: Uncategorized — mayoff @ 5:32 am

So I wrote a MacOS X screen saver, Fractal Clock. The next thing to do is make it available to the general public. Apple recommends distributing software using disk images.

I could build the disk image using Disk Utility, but if I need to do so often, using Disk Utility will be tedious. And if I need to do so rarely, I’ll forget the steps. Obviously I should automate the process.

Since I’m using Xcode to build FractalClock.saver, I’m going to put the automation right in my FractalClock Xcode project.

So, first I choose menu item Project > New Target. From the list that pops up, I choose “Shell Script Target”. I name it “FractalClock.dmg” because that’s what I intend to build. Xcode immediately displays the info pane for the new target. Since I’ll need to have FractalClock.saver built before I can build a disk image containing it, I need to add a direct dependency. I click the plus button at the bottom of the info pane and choose FractalClock from the list. Then I close the pane. I click on the disclosure triangle next to the new target in the Groups & Files list, so it looks like this:

I double-click on “Run Script” and get the info pane for that phase. Here’s the script:

set -ex

[ "$ACTION" = build ] || exit 0
[ "$BUILD_VARIANTS" = "normal" ] || exit 0

dir="$TEMP_FILES_DIR/disk"
dmg="$BUILT_PRODUCTS_DIR/$PROJECT_NAME.dmg"

rm -rf "$dir"
mkdir "$dir"
cp -R "$BUILT_PRODUCTS_DIR/$PROJECT_NAME.saver" "$dir"
rm -f "$dmg"
hdiutil create -srcfolder "$dir" -volname "$PROJECT_NAME" "$dmg"
hdiutil internet-enable -yes "$dmg"
rm -rf "$dir"

I click the plus button under the Input Files list and set the name to $(BUILT_PRODUCTS_DIR)/FractalClock.saver. I click the plus button under the Output Files list and set the name to $(BUILT_PRODUCTS_DIR)/FractalClock.dmg. The pane ends up looking like this:

Now I can build a disk image containing FractalClock.saver by right-clicking on the FractalClock.dmg target and choosing “Build FractalClock.dmg”. The resulting disk image (found in the build/Release subdirectory) is Internet-enabled, so if I put it on the web and a visitor downloads it with Safari, Safari will automatically unpack FractalClock.saver and put the disk image in the Trash.

I also want to build a disk image containing the FractalClock source code. So I create another target, named FractalClock-source.dmg. It doesn’t have any direct dependencies. I could make all of the source files be its direct dependencies, but that’s too much work. At any rate, I want the contents of the disk image to be a pristine copy of the source code, without any of the build files. Since I’m keeping the source code in Subversion, I’ll make the shell script for FractalClock-source.dmg check out a fresh copy of the source tree. Here’s the script:

set -ex

[ "$ACTION" = build ] || exit 0
[ "$BUILD_VARIANTS" = "normal" ] || exit 0

url="$(svn info . | grep ^URL | sed 's/^URL: //')"
dir="$TEMP_FILES_DIR/disk"
dmg="$BUILT_PRODUCTS_DIR/$PROJECT_NAME-source.dmg"

rm -rf "$dir"
mkdir "$dir"
svn export "$url" "$dir/FractalClock-source"
rm -f "$dmg"
hdiutil create -srcfolder "$dir" -volname "$PROJECT_NAME-source" "$dmg"
hdiutil internet-enable -yes "$dmg"
rm -rf "$dir"

I don’t add any files to the Input Files or Output Files lists for the FractalClock-source.dmg Run Script phase. It’s too much work to list all of the individual files that are its input, and if I list its output but not its input then Xcode won’t know when it needs to be rebuilt. This way, it will just rebuild it from scratch whenever I right-click the target and choose Build.

Since I’m going to be putting the disk images on my web site, I want to be able to upload them easily also. So I create a subdirectory named web in my project directory. I put the web files other than the disk images there. There are just two, index.html and saver.png. Then I create one more shell script target, named “Web Site”. It has two direct dependencies: FractalClock.dmg and FractalClock-source.dmg. Here’s the script:

set -ex

rsync -avz "$BUILT_PRODUCTS_DIR/$PROJECT_NAME.dmg" "www.dqd.com:www/programs/FractalClock/."
rsync -avz "$BUILT_PRODUCTS_DIR/$PROJECT_NAME-source.dmg" "www.dqd.com:www/programs/FractalClock/."
rsync -avz "web/." "www.dqd.com:www/programs/FractalClock/."

Now, when I right-click on the “Web Site” target and choosing “Build Web Site”, Xcode builds both the application and source disk images, and copies them and the web files to my web site. What could be simpler?

Fractal Clock Screen Saver

Filed under: Uncategorized — mayoff @ 4:33 am

I have written a MacOS X screen saver called Fractal Clock. Enjoy.
Enjoy, damn it!

This was inspired by an article on the Wolfram blog, wherein
Theodore Gray asks, “Why Spend More Than Five Minutes on a GUI?” The obvious answer is, “Because you don’t have $2500 to spend on Mathematica.”

I do have Mathematica, and Tree Bender is a fun toy, but another answer to Theodore’s question is: Mathematica is slow. My native version runs a lot faster. Also, you can’t write a screen saver in Mathematica.

2007/05/06

Cunctatious

Filed under: Uncategorized — mayoff @ 5:41 am

“Cunctatious” is a wonderful word I ran across in the OED that I think, sadly, describes me.

2007/05/05

Birds and Bugs

Filed under: Uncategorized — mayoff @ 6:07 am

I was stopped at a light on the way to work when I saw a bird land on the sidewalk, pull a bug out of a crack, and start eating it. Presumably, birds find bugs tasty. That’s a weird thought. When a bird grabs a bug in its beak, and crunches down, and the bug shell cracks, and bug goop squirts out onto the bird’s tongue, does the bird think, “Yum, I want some more of that!”? I’m not sure how to punctuate the end of that last sentence.

Movie Obligation #4: Hot Fuzz

Filed under: Uncategorized — mayoff @ 6:04 am

We saw this on Sunday, as I recall. I liked it a lot. Even more than Shaun of the Dead.

2007/04/08

Movie Obligation #3: Blades of Glory

Filed under: Uncategorized — mayoff @ 4:12 am

Very funny. I liked this movie a lot. I got Todd’s pizza without realizing it.

2007/02/06

Movie Obligation #2: Smokin’ Aces

Filed under: Uncategorized — mayoff @ 1:31 am

This movie was not worth my time.

Going to the movie theater sucks. It costs more than seeing a movie at home. At home, I can eat whatever I want. At the Alamo, the only thing on the menu that I find appetizing is the pepperoni pizza, which isn’t what I want to be eating. I can’t pause or rewind to hear missed dialogue, get a drink, or use the toilet.

2007/01/14

Movie Obligation #1: Children of men

Filed under: Uncategorized — mayoff @ 10:17 pm

I hate going to movies at the theater, but to get John to come to RGM, I agreed to go to twelve movies at the theater. Today I went to the first: Children of Men at the Alamo South. We got there late enough to have to take seats in the third row at the far left. I had a caesar salad with chicken. The movie was OK. It’s one of those gritty near-future settings, but less technology-driven than most I’m familiar with. After, we ran into JB and his brother, who’d been seeing the same movie.

2006/11/22

Cocoa Programming Notes

Filed under: Uncategorized — mayoff @ 7:14 pm

It appears to be perfectly acceptable to set an NSArrayController’s content object to an NSSet. For example:

NSSet* symbolSet = [stockMarket symbolSet];
[symbolListController setContent:symbolSet];

On a related note, suppose your NSArrayController’s content is a set (or array) of NSStrings, and you want it to sort those strings by their values. You have to give the controller an NSSortDescriptor, and an NSSortDescriptor requires a key path specifying a property of the controlled objects. But in this case you don’t want to sort by a property, you want to sort by the objects (NSStrings) themselves. It turns out that NSObject has a method, -(id)self, which returns self. So you can specify @"self" as the key path, like this:

NSSortDescriptor* sd = [[[NSSortDescriptor alloc]
    initWithKey:@"self" ascending:YES] autorelease];
[symbolListController setSortDescriptors:
    [NSArray arrayWithObject:sd]];

Note that specifying nil or @"" as the key path will not work.

2006/11/11

Impressive speed from the V640

Filed under: Uncategorized — mayoff @ 11:04 pm

According to Speakeasy’s speed test, I’m getting over 1200 kbps download speed (and over 120 kbps upload) using the Verizon V640 ExpressCard. I love technology!

2006/11/08

Parallels + Windows XP from Virtual PC

Filed under: Uncategorized — mayoff @ 11:38 pm

I have a copy of “Microsoft Virtual PC for Mac Version 7 with Windows XP Professional” that I used on my PowerBook. Now I’ve got a MacBook Pro, which Virtual PC doesn’t support and I’d rather use Parallels anyway.

This page describes how to make a bootable Windows XP installation CD from the Virtual PC installation CDs. I did that under Virtual PC on the old PowerBook. Virtual PC couldn’t burn the CD, so I copied the ISO to a shared folder and burned it using Disk Utility.

Then I tried to use it in Parallels. Parallels said, “No boot device available, press Enter to continue”. I modified the Parallels virtual machine configuration so that the CD-ROM was on IDE 0:0 and the hard disk was on IDE 1:0. That allowed the Parallels VM to find and boot the CD.

Booting from the install CD gets a bootable second-stage installer copied to the hard drive. Then the VM reboots. This happens quickly and silently in Parallels, so I ended up back in the first-stage installer again without noticing (I’d put the CD first in the boot order). I changed the CD to last in the boot order and got the “No boot device available” message again. So I changed the hard disk back to IDE 0:0 and the VM booted the second-stage installer.

I encountered no other problems after that. I was able to activate Windows XP inside the Parallels VM with no trouble (even though I’ve activated it under Virtual PC in the past).

MacBook Pro + V640 ExpressCard

Filed under: Uncategorized — mayoff @ 7:51 pm

I bought a V620 EVDO card from Verizon months ago to use with my PowerBook. Now that I’m on a MacBook Pro that card is useless because the MBP has an ExpressCard/34 slot instead of a PC Card slot.

Verizon sells the V640 ExpressCard, so I decided to buy one. Of course I wanted to transfer my existing service to the new card rather than get a new contract. I ended up having to go to the Verizon Wireless kiosk at the mall; I couldn’t manage to order one online or by phone without getting a new contract. Total cost: nigh $350. $299.99 for the card, plus tax, plus a $20 fee to “change handsets”. Pretty steep, but the ~18 months left on my contract would go to waste without the new card.

So the card arrived this morning by Fedex. I put it in the MBP, which recognized it, gave me a nice menu bar extra for it, and asked if I wanted to activate it, which I did. Unfortunately the activation didn’t work, presumably because my old card was still activated. I tried to activate the new card at verizonwireless.com but it didn’t work and told me to call an 800 number. So I called the 800 number and was able to activate the new card that way. Actually I had to give them the card’s ESN over the phone, and then the MBP activated the card.

Other than that, it works great – better than the V620 did. The V620 wasn’t supported by Apple and required a small hack to get working, and didn’t give me the nice menu bar extra showing the single strength. The V640 requires no hacks and just works.

2006/09/17

Bird Flu

Filed under: Uncategorized — mayoff @ 10:48 pm

We’re sitting around watching a video on youtube of “strikeouts”, which is where you take a bong hit and hold it in, chug a beer, take a shot, and then exhale. Tony says, “I bet bird flu will put an end to this.”

Everyone else says, “Bird flu? What the fuck?”

Tony says, “Who would want to share a bong with bird flu running around?”

2006/08/15

making spotlight tolerable

Filed under: Uncategorized — mayoff @ 12:28 pm

The Mac OS X Spotlight menu (the blue circle in the upper right corner of the screen) is incredibly annoying.  You decide to use Spotlight to find something, so you click the menu or press Command-Space, you type your search string, and then you remember how annoyingly slow Spotlight is.  And you can’t decide to do anything else on the computer while you’re waiting, because clicking anywhere else will abandon the search.

The key to making Spotlight useful is to change Command-Space to pop up the Spotlight window instead of the Spotlight menu.  The window can perform a search while you’re doing things in other windows – the menu can’t.  So the frustrating slowness of Spotlight becomes tolerable because you’re not locked out of your Mac while waiting for the search results.

You can change the mapping by opening System Preferences.  Click on Keyboard & Mouse.  Then click the Keyboard Shortcuts tab.  Scroll down a bit to the Spotlight section.  Uncheck the checkbox next to “Show Spotlight search field”.  Double-click the shortcut area at the right end of the line that says “Show Spotlight window” and then press Command-Space (or whatever you want to use).  Now, pressing Command-Space will open the Spotlight window with the insertion point right in the search field, waiting for your input.  While waiting for the results, you can work in other windows.

2006/07/02

Mortgage Calculator

Filed under: Uncategorized — mayoff @ 5:11 pm

I’ve been thinking about how to compare mortgages, because I’m buying a house. There are several decisions to make. I’ve written a mortgage calculator that takes them all into account. It’s in Javascript, and I’ve tested it in Safari and Firefox. I seriously doubt it works in Internet Explorer. Anyway, here are the decisions.

Any money used to pay off the loan principal is effectively an investment with the same interest rate as the loan. Several of the decisions are between paying down the principal and investing the money elsewhere. You have to decide whether you think you can invest at a better rate than the loan’s. If so, you generally want to invest rather than pay down the loan principal. If (like me) you think you can’t invest at a better rate than the loan’s, then you have to decide how much liquidity you want, because money used to pay down the loan principal can’t easily be reclaimed.

You can spend money on “points” to get a lower interest rate, or you can put that money into a larger downpayment, or you can invest the money. This has an additional tradeoff: if you think you’ll refinance the loan at some point, you have to consider whether the lower interest rate will cover its cost by the time you bail out, which involves looking at your equity and your investment at the time of the bail-out. On the other hand, if you intend to pay off the loan without refinancing, then you will always end up with the full equity of the property and you only need to consider your investment’s value at the end of the loan.

You can choose a shorter loan term, which gets you a lower interest rate, but your monthly payment is higher. Or you can take a longer loan term, which gives you a higher interest rate but a lower monthly payment. You can then go ahead and pay extra each month, paying off the loan early. By taking the longer term loan and higher interest rate, you’re buying the option of making lower payments, which is handy if you might want or need to live off your savings for a while.

You can deduct the mortgage interest from your taxable income, so a higher interest rate gives you a larger tax deduction. You can either invest the tax savings or you can add it to your monthly payments.

There’s another factor which I haven’t implemented yet: inflation. You’re borrowing today’s dollars and paying back future dollars. Because of inflation, future dollars will have less buying power than current dollars. If you assume that your earning power will keep up with inflation, then inflation effectively reduces the interest rate of the loan. I haven’t decided exactly how to handle this in the calculator yet.

2006/06/29

John Raese is a spammer

Filed under: Uncategorized — mayoff @ 11:35 am

If you live in West Virginia, please don’t vote for John Raese.  He’s a spammer.  I don’t even live in West Virginia and he’s sending me his junk email.

2006/03/04

fedora core 4 upgrade problems

Filed under: Uncategorized — mayoff @ 12:21 pm

I tried to upgrade my Thinkpad A30p from Fedora Core 3 to Fedora Core 4. First I tried using a DVD, but apparently the A30p doesn’t boot off DVDs. Then I tried a CD and it booted that but after LILO the screen just went black; even the text mode install (”linux text” at the boot prompt) didn’t fix it. Using “linux nofb” at the boot prompt fixed that problem.

Then when I told it to start the upgrade, I got an unhandled exception:

Traceback (most recent call list):
  File "/usr/lib/anaconda/gui.py", line 1137, in handleRenderCallback
    self.currentWindow.renderCallback()
  File "/usr/lib/anaconda/iw/progress_gui.py", line 244, in renderCallback
    self.intf.icw.nextClicked()
  File "/usr/lib/anaconda/gui.py", line 873, in nextClicked
    self.dispatch.gotoNext()
  File "/usr/lib/anaconda/dispatch.py", line 174, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/dispatch.py", line 242, in moveStep
    rc = apply(func, self.bindArgs(args))
  File "/usr/lib/anaconda/packages.py", line 827, in doPreInstall
    f.close()
IOError: [Errno 22] Invalid argument

This happened because I had replaced my /etc/mtab file with a symbolic link to /proc/mounts. Anaconda (the RedHat/Fedora Core installer) tries to truncate /etc/mtab and could not do so. Replacing the symbolic link with an empty file fixed this problem.

2005/12/12

How to get a $1550 discount on a flat-panel TV

Filed under: Uncategorized — mayoff @ 9:22 pm

Step 1. Own a TV stand that takes about 7.75 square feet of floor space.
Step 2. Buy a house for $200 per square foot.
Step 3. Buy a flat-panel TV and mount it on the wall.

You have now reclaimed approximately $1550 worth of square footage.

(No, I haven’t bought a new house yet.)

2005/12/03

video games

Filed under: Uncategorized — mayoff @ 11:21 pm
David Plays Guitar Hero

Shadow of the Colossus: Excellent. It’s longer than Ico, with more action, and just as beautiful and intriguing.

Ratchet: Deadlocked: Disappointing. They kind of phoned it in on this installment, I think. The story was virtually non-existent. I didn’t find the weapons to be as entertaining. Maybe I’m just getting tired of this series. I haven’t tried the multiplayer support.

SSX On Tour: Satisfying. The snowboarding gameplay is largely the same as in SSX3 (except for the ubertrick system), but on a new set of runs. I haven’t tried skiing yet.

Guitar Hero: Satisfying. Almost excellent. The guitar controller makes it easy for non-video-gamers to get into this game. However, for the hardcore gamer this game falls short of Dance Dance Revolution. DDR has an extensive practice mode, and GH desperately needs a similar mode.

2005/10/30

Tracing message sends in Objective-C

Filed under: Uncategorized — mayoff @ 10:05 pm

Update: It turns it there’s a much easier, more reliable way to see every Objective-C message send. So ignore the rest of this post and read about NSObjCMessageLoggingEnabled in TN2124.


So now I’m trying to get bindings working when I put my NSCell subclass in a table column. It appears, for the standard NSCell subclasses, that NSTableColumn looks at the subclass’s exposed bindings and re-exposes them on itself. However, it’s not doing that for my NSCell subclass’s bindings.

So, I want to trace the messages that are flying around inside Interface Builder to see if I can figure out how NSTableColumn decides what bindings to expose. Ideally I’d have a little dynamic library with a logging version of objc_msgSend and I could get Interface Builder to run using that. I don’t have that (yet). I found this old Usenet post from a NeXT engineer showing how to trace objc_msgSend using GDB. That will be much slower than smashing in a logging version of objc_msgSend, but it’s better than nothing.

Of course, the GDB command in that Usenet post is for NEXTSTEP running on Intel. It’ll probably work on MacOS X running on Intel, but my Powerbook has a PowerPC processor. Also, Apple introduced a new message-send function in Tiger, so you have to set two breakpoints. These commands work on MacOS X on PowerPC:

b objc_msgSend
comm
silent
printf "%c[%s %s]\n", $r3&&((id)$r3)->isa->info&2?'+':'-', $r3?((id)$r3)->isa->name:"nil", $r4
cont
end
b objc_msgSend_rtp
comm
silent
printf "%c[%s %s]\n", $r3&&((id)$r3)->isa->info&2?'+':'-', $r3?((id)$r3)->isa->name:"nil", $r4
cont
end

Here’s some sample output from GDB, tracing the first few messages sent in -[NSObject exposedBindings]:

-[NSTableColumn _bindingAdaptor]
+[NSBinder binderClassesForObject:]
+[NSBinder _allBinderClasses]
+[NSDisplayPatternTitleBinder isUsableWithObject:]
+[NSBox self]
-[NSTableColumn isKindOfClass:]
+[NSWindow self]
-[NSTableColumn isKindOfClass:]
+[NSWindowTemplate self]
-[NSTableColumn isKindOfClass:]
+[NSTableBinder isUsableWithObject:]
+[NSTableView self]
-[NSTableColumn isKindOfClass:]
+[NSObjectParameterBinder isUsableWithObject:]
+[NSObjectParameterBinder binderClassesSuperseded]
+[NSArray array]
+[NSArray allocWithZone:]

Dragging an NSCell subclass from an Interface Builder palette

Filed under: Uncategorized — mayoff @ 5:18 am

If you’ve got your own NSCell subclass that you want to put on an Interface Builder palette, you’ll probably think that you need to call -[IBPalette associateObject:ofType:withView:] using IBCellPboardType as the type. This doesn’t work. It turns out you need to use IBTableColumnPboardType. I don’t know what IBCellPboardType is for.

Also, IB will send -[NSCell setObjectValue:] to your cell to fill in the dummy values in puts it tables in design mode. So you have to be able to accept the values it sends (probably of type NSNumber and/or NSString), even if your cell doesn’t normally accept values of those types.

Also, if you want to see how IB’s built-in “Data Views” palette (the one with the table view and the cells on it) draws the built-in cells, open up this nib:

/Developer/Applications/Interface Builder.app/Contents/Resources/CocoaFramework.palette/Contents/Resources/IBDataViews.nib

It turns out to be kind of a hack, with two NSTextFields and some appropriate control (NSButton, NSSlider, etc.) on top of each other, nested in a simple NSView. The NSTextFields are set up to overlap, with the bottom one having a black border and the top one having no border and covering the sides of the bottom one.

It’s very handy to add a “custom executable” to your IB palette Xcode project, with the executable being “/Developer/Applications/Interface Builder.app”. Then you can press Command-R to start IB to test out your palette, or Command-Y to run IB under GDB so you can debug your palette. Be careful not to start IB by some other mechanism (like by double-clicking a nib) if you’re going to use this technique, because IB won’t start up correctly and (at least for me) Xcode will probably hang.

2005/10/14

Full screen QuickTime Player for free

Filed under: Uncategorized — mayoff @ 12:57 am

It’s fairly easy to make QuickTime Player go full screen, even if you don’t want to pay for “QuickTime Pro”. You can do it with a small AppleScript and the Script Menu. (This was inspired by QuikTimeFS, but that requires running an extra little application every time you want to go full screen.)

Instead of walking you through the process of enabling the Script Menu, creating the necessary folders, and using the Script Editor to create the one-line AppleScript, I’ve written an AppleScript that does all of those steps for you: Setup Full Screen.

After you download and run that, you’ll have the Script Menu toward the right end of your menu bar. It looks like this: Script Menu icon.

If you launch QuickTime Player, you’ll find a Full Screen script in the script menu:

Full Screen Menu Item

When you select that menu item, if you have a movie open, the movie will play full screen. You can press the Escape key (labelled “esc” at the upper left corner of your keyboard) to get back out of full screen mode.

If you don’t trust me, you can inspect the Setup Full Screen script by opening it with Applications > AppleScript > Script Editor.

Update: It turns out I’m not the only one to think of this. QT Full Screen does roughly the same thing, but uses an Installer package to install the full-screen script instead of doing it in an AppleScript.

2005/10/12

LabelWriter Catch-22

Filed under: Uncategorized — mayoff @ 9:05 pm

Meanwhile, I’m way, way behind in my filing. I wanted to catch up a bit, and discovered that my Dymo LabelWriter 330 Turbo (which prints my folder labels) is dead. If I want to get it fixed under warranty, I need to find the receipt. To find the receipt, I need to file my huge backlog of documents. To file my huge backlog of documents, I need to print folder labels.

Update: I found the e-mail receipt from buy.com (in my “Receipts” e-mail folder, no less). It’s still under warranty and I’ve got an RMA from Dymo.

More 2405FPW

Filed under: Uncategorized — mayoff @ 8:57 pm

I’ve been so spoiled by the Dell 2405FPW on my desk at work that I just ordered one for home (about $780 before tax thanks to a 35% deal that expires today). Now I have to decide whether to sell my 2001FP (20.1″ 1600×1200 LCD) or buy a PCMCIA video card so I can connect both to the Powerbook simultaneously.

Meanwhile, others at the company liked the 2405FPW enough that the company bought nine more of them.

Oh yeah, and the replacement for the defective 2001FP arrived Monday, right on schedule.

2005/10/06

video games

Filed under: Uncategorized — mayoff @ 11:07 pm

Ultimate Spider-Man: Disappointing. I was hoping for a game that would improve on the Spider-Man 2 experience. This didn’t. The graphics are fine – I like toon shading. The story is very short, and not nearly as good as Spider-Man 2’s. The controls and the fighting are vastly simplified from Spider-Man 2. There is almost nothing in the way of ability upgrades, unlike Spider-Man 2.

We ♥ Katamari: Satisfying. There’s nothing revolutionary here, but there are some nice new features. Katamari Damacy left me wanting more, and this meets that desire well. The soundtrack is not as good, though.

Sly 3: Band of Thieves Satisfying. I thought the original Sly Cooper and the Thievius Racoonus was pretty good, and I thought Sly 2: Band of Thieves was great. This is a lot like Sly 2, but the clue bottles are gone, you get to play several extra characters with neat abilities, and the mini-games are quite fun. Also, remarkably, Sly’s special attacks work against the bosses, which is pretty unusual in my experience.

I’m looking forward to Shadow of the Colossus (from the creator of Ico), and I’ll probably buy SSX On Tour and Ratchet: Deadlocked too. Yes, I’ve noticed that five of these six games are sequels.

Dell support for the service-tag-impaired

Filed under: Uncategorized — mayoff @ 10:39 pm

If you have a Dell product with no service tag, and you need support, expect to spend a long time on the phone.

I bought a Dell 2001FP LCD monitor on 2005/2/17. A few days ago, it broke. Specifically, about 20 black lines now run down the center of the display, with a few pixels between each. These lines show up even in the self-test screen, so it’s definitely a problem in the monitor.

You can see the lines running across this image: Close Up of Broken Monitor They run horizontally in the image because I’ve got the monitor rotated 90°. The problem is much more apparent in real life. It’s difficult to photograph (at least with my crappy camera).

I quickly discovered that you cannot get on-line support unless you have a product with a service tag (a short unique string like a serial number). Dell monitors don’t have service tags. If you have the monitor connected to a Dell computer, you can use the computer’s service tag. My monitor is connected to my Apple PowerBook.

My only option was to call Dell tech support. The number wasn’t easy to find, either. I found it on the warranty page, which was also not as easy to find as it should have been:

http://www1.us.dell.com/content/topics/global.aspx/policy/en/policy?c=us&cs=19&l=en&s=dhs&~section=010

As you might expect, this was followed by a total of about 30 minutes on hold. They have promised to ship me a new monitor, and it should arrive Tuesday or Wednesday.

2005/09/13

Treo 650 at last

Filed under: Uncategorized — mayoff @ 6:23 pm

I finally gave up waiting for T-Mobile to release a Treo 650 and got one from Verizon. I was spurred to do so because I also wanted to get a Verizon EVDO card and the EVDO monthly rate is $20 less if you have a Verizon phone.

What do you call it when they fix a regression? The Treo 600 had a serious regression from the Treo 270. In the 270’s phone application, you could either dial a number or do an address book lookup, without telling the phone which one you were doing, and it would magically figure it out. You’d just start pressing the buttons and the phone would figure out what you were trying to do. The Treo 600 lacked the feature and it annoyed me to no end. Well, the 650 has the feature again.

However, perhaps as payment, the Treo 650’s calendar application has a serious regression. On previous Treos, the calendar has an “upcoming events” view that lists as many of the next future events as will fit on the screen. I used this view often. The Treo 650 lacks that view.

Also, the 650’s Bluetooth support is weak. It supports headsets and handsfree kits, and supports hotsync over Bluetooth. There’s a hack that lets you do (incredibly slow) Bluetooth dial-up networking (DUN). But there’s no Bluetooth file transfer, nor does the 650 work with Mac OS X’s Address Book.

2005/09/08

python debugger script

Filed under: Uncategorized — mayoff @ 10:48 am

Put this in a file named pdb in your $PATH and make it executable:

#!/bin/bash
exec python "$(python -c 'import pdb; print pdb.__file__')" "$@"

Now if you want to run some Python script under the debugger, run pdb on it. For example, if you have a script named reverse.py that you want to run under the debugger:

$ pdb reverse.py
> <string>(1)?()
(Pdb) s
--Call--
> /Users/mayoff/reverse.py(1)?()
-> class Node:
(Pdb) 

2005/08/07

A DVD player that sucks less

Filed under: Uncategorized — mayoff @ 11:35 pm

Remember the good old days, when you’d rent a video tape, put it in the VCR, and fast forward through the FBI idiocy and the trailers to the movie? Now you get a DVD from Netflix but you can’t skip the FBI idiocy, and sometimes they even throw in some non-skippable ads. Then you have to watch a menu animate onto the screen, select “Play Movie”, and watch the menu animate back off the screen. I hate Hollywood so much.

My savior has arrived in the form of a GoVideo VR3845. This combination DVD-recorder and VCR has a feature called “Autoplay”. You put in a DVD and it automatically skips the FBI blah, the ads, the trailers, and the menu and just plays the movie. Brilliant! I’ve only tested it on one DVD so far (Igby Goes Down) but it worked like a charm.

2005/07/25

Paul Graham’s Accumulator Generator, in PostScript

Filed under: Uncategorized — mayoff @ 6:45 pm

In Revenge of the Nerds, Paul Graham defines the accumulator generator problem. Solving it requires using a programming language that has, or can simulate, closures and a polymorphic add function. He presents solutions in a number of languages, submitted by various people.

He’s no longer accepting solutions, but I managed to solve it in PostScript anyway:

/make-adder {
    [ exch
        [ exch ]
        {
            dup 3 1 roll
            0 get add
            dup 3 1 roll
            0 exch put
        } /exec cvx
    ] cvx
} def

You can test it out in Ghostscript. For example:

GS>/x 1 make-adder def
GS>5 x ==
6
GS>/y 3 make-adder def
GS>2.3 x ==
8.3
GS>.7 x ==
9.0
GS>10 y ==
13

2005/07/13

Dell 2405FPW

Filed under: Uncategorized — mayoff @ 2:52 pm

At my office I’ve been connecting a Sony 20″ 1600×1200 LCD monitor to my Powerbook. However, this only lets me put two 80-column Terminal windows side-by-side. There’s more horizontal space, but not enough for a third 80-column terminal. (Not at my preferred font size, anyway). So I ordered a Dell 2405FPW, which is 24″ and 1920×1200. It has enough room for a third terminal.

Most of the other LCDs around the office are Apple displays, but the Dell displays have a few advantages. First, they’re cheaper. Second, the Dell stands are much more flexible. Third, the Dells have four USB ports. Fourth, the Dells support VGA, S-Video, and composite video inputs in addition to DVI. The 2405FPW also supports component video and has four memory-card reader slots. The only advantage of the Apple monitors is that they have a Firewire hub, but nobody here needs that.

My 2405FPW arrived Tuesday. The stand is height-adjustable and rotates, unlike the Apple stand. In addition, it supports rotating the monitor 90 degrees, into “portrait” orientation. MacOS X supports this (you set it in the Displays system preference pane), so I decided to try it just for fun.

It turns out that this is totally awesome. Here’s what it looks like:

Powerbook and 2405FPW

I actually had a sense of vertigo looking at the monitor this way. The viewable area is about 20.5 inches tall. What sold me on this arrangement is that I can now get four tall (57-line) 80-column terminals on the screen with no overlap:

Powerbook and 2405FPW with terminals

2005/05/27

the awesome power of recursive shell functions

Filed under: Uncategorized — mayoff @ 3:51 pm

Recursive shell functions allow you to build a pipeline dynamically. For example, if you want to print lines from standard input only if they match both of two regular expressions, you might do this:

grep2 () {
    grep -e "$1" | grep -e "$2"
}

But what if you want to allow any number of regular expressions? Here’s the way:

mgrep () {
    if [ $# = 0 ]; then
        cat
    else
        pattern="$1"
        shift
        grep -e "$pattern" | mgrep "$@"
    fi
}

2005/05/25

the horrible, horrible software that comes with the HP Photosmart 2610

Filed under: Uncategorized — mayoff @ 1:11 am

I bought Delia a new PowerBook from the online Apple Store. They offered a $100 rebate for a number of printers. It would be convenient to have a copier and a fax machine, and might be nice to print photographs, so I chose the HP Photosmart 2610 all-in-one. I read some reviews first, and there were complaints about difficulty installing the software. I assumed those complaints were for the Windows software. “That won’t be a problem for me because we use Macs,” I smugly thought.

Boy, was I wrong. The HP software sucks.

The software installer insisted on quitting all my other applications. OK, that’s somewhat minor, but an annoyance.

Then, after it installed the software, it launched the HP All-in-One Setup Assistant. The setup assistant crashed one or two screens in. Joy.

“Maybe,” I thought, “it needs to be rebooted to work. The developers were obviously not very good, so maybe they forgot to program that in.” So I rebooted. The setup assistant started automatically when I logged in.

The setup assistant didn’t crash this time. I did start getting mysterious pop-up messages informing me that “The automatic document feeder is empty.” Of course, I wasn’t trying to scan anything – I was still trying to set up the printer. Furthermore, my 2610 has no automatic document feeder. In fact, the 2610 does not support an automatic document feeder.

Anyway, ignoring those messages, I proceeded through the setup assistant. It apparently set up the fax support successfully, then launched Apple’s Printer Setup Utility for me. Unfortunately, I could not set up the printer because the setup utility thought the printer was an “Unsupported Printer” and there was no option for the printer in the pop-up list of drivers.

Checking the HP support website revealed no new software to download.

So I uninstalled all of the HP software to try again. I must say that the uninstaller worked great. HP sure knows how to uninstall its crapware.

On the second install, I manually quit all of my other applications first. It didn’t help. The setup assistant didn’t crash, but I still couldn’t set up the printer.

I checked HP’s support website again. One of the very few FAQs commanded that I disable all startup items. It didn’t give detailed directions, just pointed me at the /Library/StartupItems folder and the Login Items pane of the Accounts preference panel. Fortunately I know how to become root and move things around, so I was able to move all of the items out of /Library/StartupItems and I made a backup of my ~/Library/Preferences/loginwindow.plist before removing all of my Login Items using System Preferences.

Then I uninstalled the HP crapware, rebooted, and installed it again. Miracle! This time the Printer Setup Utility identified the printer and offered to use the HP All-in-One driver (which still didn’t appear in the pop-up list of drivers, as far as I could tell).

Of course, I was still getting that “The automatic document feeder is empty” message every minute or two.

More searching revealed (in some HP support forums) that others have had this problem, with other HP printers. One poster said that turning the printer (not a 2610, some other model) off and on fixed the problem. That appears to work.

However, if I reboot, the HP All-in-One Setup Assistant runs again, and the message comes back! Each time the setup assistant runs, it re-enables the printer’s brain damage. I never managed to get the Setup Assistant to agree that I had run it to completion, although I don’t know why. Ultimately I renamed the application. I haven’t rebooted since doing that so I don’t know if that will prevent it from starting up after I do.

So, in closing, HP’s software was written by drunk monkeys and tested by a stoned hamster. Kids, don’t do drugs.

2005/04/27

12

Filed under: Uncategorized — mayoff @ 12:36 am

Things to analyze for hacking MacOS X:

Pixie.app – defines a hotkey and scrapes the screen
Quartz Debug.app – messes with the brightness of windows belonging to other apps
FunkyOverlayWindow – defines a hotkey using Carbon

2005/04/25

11

Filed under: Uncategorized — mayoff @ 5:39 pm

Let the record show that on a 2005 15″ Powerbook it is possible to distinguish the left and right Command and Shift keys.

2005/04/14

This might only be funny if you know the context

Filed under: Uncategorized — mayoff @ 6:32 pm

“I don’t hand sharp knives to small children.” — PJ

“If you have sharper knives, you don’t need as many small children around!” — Rob

2005/04/11

need better cmd-tab in macosx

Filed under: Uncategorized — mayoff @ 4:07 pm

I need a MacOS X hack that makes Command-Tab select among all windows, not just among applications. That is, it should work like it Alt-Tab does in Windows and Metacity.

I know about Command-Tilde. I even know about Control-F4. Not what I’m after!

2005/04/07

handy bash alias

Filed under: Uncategorized — mayoff @ 6:23 pm

Often I run some command that’s going to take a long time to finish, like

  make solver

and when it’s done I want to run some other command, like

  ./solver < problem.1

but I only want to run that second command if the first command (the make in this example) succeeded. If I’d thought ahead, I could have run this in the first place:

  make solver && ./solver < problem.1

But I didn’t. So I have this handy bash alias:

  alias +='(exit $?) && '

Which gives me a similar effect. I run the first command (the make), and while it’s running I type in a plus followed by the second command:

  + ./solver < problem.1

If the first command finishes, the second command will run. Otherwise, the second command will be ignored.

Note that this only works if the first command doesn’t read from standard input.

2005/03/21

“post-9/11-world”

Filed under: Uncategorized — mayoff @ 11:57 am

I’ve noticed that you hear words like “post-9/11-world” a lot from the Bush administration. What does that mean, exactly? Every action that the terrorists are willing to carry out now, they were willing to carry out on September 10, 2001. The terrorists didn’t change on 9/11. The administration did. All “post-9/11-world” means is, “since the administration pulled its collective head out of its collective ass and realized that terrorism is a serious, immediate issue”. So every time you hear Bush or Cheney or Rice say “post-9/11-world”, ask yourself why his or her head was in his or her ass in the first place.

2004/11/17

The perfect wedding gift

Filed under: Uncategorized — mayoff @ 5:53 pm

The perfect wedding gift is an automatic thank-you note writer. Unfortunately I don’t think it exists.

2004/10/20

Beating the web into submission: killing fixed-width tables

Filed under: Uncategorized — mayoff @ 3:03 pm

Another big problem with a lot of web sites is that they use tables to force the content down to a narrow column. Oh how I hate that. It’s quite popular, though. yahoo.com, nytimes.com, audible.com…

It’s particularly bad when I’m using my T221, because then I’m using 32 pixel fonts, so a website that uses a 400px column gives me about 5 words (or less) per line, and huge expanses of empty margin. Useless!

My first approach to fixing this was another bookmarklet:

javascript:void((function(){function doit(es){for(var i=0;i<es.length;++i)if('width' in es[i])es[i].width='auto';}doit(document.getElementsByTagName('TABLE'));doit(document.getElementsByTagName('TBODY'));doit(document.getElementsByTagName('THEAD'));doit(document.getElementsByTagName('TFOOT'));doit(document.getElementsByTagName('TR'));doit(document.getElementsByTagName('TD'));doit(document.getElementsByTagName('TH'));})())

But it’s pretty annoying to have to hit the bookmarklet all the time (or to use a location bar keyword). So I’m trying a different experiment. I put this in my userContent.css:

TABLE,TD,TR,TBODY,THEAD,TFOOT {
    width: auto ! important;
}

So far, it’s bliss.

Beating the web into submission: killing stylesheets

Filed under: Uncategorized — mayoff @ 2:58 pm

Mozilla 1.8 will have the option to disable CSS entirely or on a
per-web-site basis. That will be great, because a lot of web sites have
interesting content and really crappy designs.
Until the glorious day when Fedora Core uses Mozilla 1.8, this
bookmarklet kills stylesheets on the current page:

javascript:void((function(){for(var i=0;i<document.styleSheets.length;++i){document.styleSheets[i].disabled=true;}})())

Bookmark that. Call it “Kill Stylesheets”. Click on it to disable the stylesheets on the current page.

2004/08/10

a good man page

Filed under: Uncategorized — mayoff @ 2:34 pm

It’s trivial for any C/C++ programmer to remember the purpose
of the strstr function: it finds the first occurrence
of one string in another string. The hard part is remembering which
comes first, the string to search for or the string to search in.
So inevitably I have to look at the documentation. It turns out
that even for something so apparently simple as the documentation
of strstr, it’s possible to design a solution that is
qualitatively better than “adequate” or “sufficient”.

The C99 standard §7.21.5.7 describes it this way:

Synopsis

char *strstr(const char *s1, const char *s2);

Description

The strstr function locates the first occurrence in
the string pointed to by s1 of the sequence of characters
(excluding the terminating null character) in the string pointed to by
s2.

Old man pages said something pretty similar. So I have to read the
description to figure out what s1 and s2 are.

The MacOS X man page is improved:

SYNOPSIS

char *strstr(const char *big, const char *little)

DESCRIPTION

The strstr() function locates the first occurrence of
the null-terminated string little in the null-terminated
string big.

Now I can look at just the synopsis and think “Hmm, a little string fits
inside a big string but not vice versa, so the string to search in must
be the first argument.” It’s faster to think that than to read the
description.

However, the Linux man page really aces the test:

SYNOPSIS

char *strstr(const char *haystack, const char *needle)

DESCRIPTION

The strstr() function finds the first occurrence of
the substring needle in the string haystack.
The terminating `’ characters are not compared.

The phrase “looking for a needle in a haystack” is so familiar to me
that when I read the synopsis, I don’t even have to think about what the
words mean. I pick up the information instantly and effortlessly.

2004/07/06

Spider-Man 2, the game

Filed under: Uncategorized — mayoff @ 7:32 pm

I have mixed feelings about this game.

The game world is fantastic. It’s huge, you can roam it seamlessly, and it has a variety of areas with different feels.

The swinging is terrific. It’s easy to get the hang of and maddeningly difficult to master.

The fighting is pretty good. There’s a good variety of moves available. Unfortunately you quickly reach a point where all of the enemies dodge most of your attacks unless you tie them up first, which tarnishes the dynamic feel of combat.

The story is acceptable but the story missions do not last long enough and are unnecessarily linear. The Mysterio, Doctor Octopus, and Black Cat storylines should proceed independently.

The pizza, MJ, and Daily Bugle missions rise in difficulty too quickly and do not provide adequate reward. All you get are hero points, and it’s easier to get hero points from street encounters.

The exploration tokens have the same problem. The only difference AFAIK is that collecting sufficient (possibly all 150) skyscraper tokens unlocks a wallsprint upgrade. Incremental rewards, such as unlocking new moves every 25 tokens, would be much nicer. It’s a particularly egregious lack in the case of the secret tokens, which are much harder to find than the other types. The secret tokens are worth more hero points than the others, but not enough – it’s much easier and more efficient to buy out the spidey store using hero points from street encounters.

The city contains many stores that you can enter in addition to the spidey stores, but except for a couple of story missions, nothing ever happens in those stores as far as I can tell.

Basically, my gripe is that they created an incredible game world and left too much potential unrealized. I’m glad I bought the game but it leaves me feeling that they could have done much more without much effort.

2004/01/28

dope

Filed under: Uncategorized — mayoff @ 10:47 pm

What ever happened to “dope” as an adjective? I never hear things described as “dope” anymore.

Blog at WordPress.com.