Portable centimetric measuring tape

 

2010-08-14 23:11:43 UTC

This is a roll-up measuring tape that tucks neatly into my wallet, mostly so that I can compare sizes of products in the store without having to buy them or go find a ruler.

File: Centimetric_Ruler-portable.pdf

A US Letter page containing the ruler (20 cm long) and a specification for the cardboard handle you glue the ruler to.

Photos:

Photo of the portable centimetric measuring tape, rolled up, sitting on a table.

Photo of the portable centimetric measuring tape, with 6 cm unrolled, sitting on a table.

In case you're wondering about the pattern of the mm markings, I borrowed it from this New Zealand ruler that Dave posted about.

If I were to assemble this again, I would glue the “tape” to the other end of the handle, so that I can unroll the tape from left to right using my right hand. If you're left-handed, you might prefer to assemble yours the same way I did assemble mine.

Dueling conferences

 

2010-08-05 22:59:14 UTC

There are two development conferences coming up this fall:

The Voices That Matter conference is cheaper, costing all of $395 per ticket with the coupon and early-bird pricing (compared to $899 for MacTech's conference [EDIT: MacTech's early-bird pricing has actually been extended, so it's $699 until August 9th 16th]), but MacTech's conference is broader, consisting of development (both Mac and iOS) plus an IT track.

As you can guess, I will not be at the Voices That Matter conference, and I will be at the MacTech conference. In fact, I'll be presenting.

My presentation, intended for new Cocoa and Cocoa Touch developers, will be a demonstration of what various kinds of bugs look like in Cocoa and Cocoa Touch applications, along with how to hunt down and fix those bugs.

Whichever conference you go to, have fun, and if you're coming to the MacTech conference, I hope to meet you there.

Being a reader of Dave's Mechanical Pencils has gotten me interested in block erasers as companions to the pencils themselves. My first mechanical pencil was a Pentel Twist-Erase III (QE515), which I chose for its wide and long built-in eraser, but, thanks to Dave, I have since switched over to a Uni Kuru Toga * for writing and a block eraser for erasing.

But which eraser?

Here in the United States, the most available eraser is the Pentel Hi-Polymer ZEH-10, usually in three- or four-packs. As a fan of the Twist-Erase eraser, I knew Pentel could make a good eraser (even though Dave disagreed about the Twist-Erase), so I wondered how good Pentel's block erasers were. At the same time, once I started reading Dave's Mechanical Pencils, I wondered how the Pentel block erasers might compare to Dave's favorite, the Staedtler Mars.

For years, all I'd ever seen were Paper-Mate erasers, store-brand erasers, and the ZEH-10, which is the larger of Pentel's two ZEH models. Indeed, that was the only Pentel eraser I knew about until I saw Dave's review of the ZES-08 (the “Hi-Polymer Soft”, which sounds like it's a different eraser compound). Then, not long ago, I spotted a three-pack of ZEH-05 (the smaller one) erasers at Stater Bros. for $2, and snapped it up.

Then all that remained was to pick up a Staedtler Mars eraser and compare them. Art Supply Warehouse to the rescue: They sell them individually for 99¢ each. Other stores sell them in four-packs for $3. (If nothing else, Pentel's ZEH erasers are cheaper: A four-pack of ZEH-10s is currently $2.64 at Target, while ASW sells the ZEH-05 individually for 72¢.)

Prior to my buying either of those, I'd bought a three-pack of store-brand pencil leads at Target for $2. That package included a block eraser. So, since I have it, I might as well include it in the comparison.

For that comparison, I used Pentel Super Hi-Polymer (a.k.a. “Ain”) lead in the HB and 2B grades on a blank store-brand (“Corner Office”) 3″×5″ index card from Walgreens.

Let us begin.

Comparison with HB lead. ZEH-05: Flawless victory. Staedtler Mars: Just a little bit less effective. Target store-brand: Pitiful.

Comparison with 2B lead. ZEH-05: Pretty close to perfect. Staedtler Mars: Well-erased, but with much smearing at the edges. Target store-brand: Not so well-erased; smearing in the middle, perhaps because it's a thinner eraser.

And both comparisons with level adjustments to better show the differences:

Comparison with HB lead. Here, too, Staedtler Mars' inferiority is just barely apparent—it's pretty much a dead heat. Target store-brand, of course, still loses by a wide margin.

Comparison with 2B lead. No real change between the ZEH-05 and Staedtler Mars; Target store-brand's loss is much more apparent now.

For erasing, Pentel's ZEH-05 wins. It's evenly matched with Staedtler Mars on the HB test, but erases a bit better with less smearing on the 2B test. And it's cheaper to boot!

Now let's look at shots of the erasers after each job and see how dirty they got:

Comparison with HB lead. The ZEH-05 barely got dirty at all; the Staedtler Mars got a bit dirty; the Target store-brand eraser is filthy.

I cleaned the Target eraser (by “erasing” a blank piece of rough cardboard) between tests.

Comparison with 2B lead. The ZEH-05 is dirty in the middle; the Staedtler Mars is about equally dirty over a larger surface; the Target store-brand eraser is about as dirty as before.

As far as dirtiness, it's pretty much a dead heat between the Pentel and the Staedtler Mars. The ZEH-05 appears dirty over less area because I'd used it more before I began testing, so it has a slightly rounder surface. Over the two erasers' dirtied areas, the 2B test got them about equally dirty.

The Target store-brand eraser lost badly on all tests. It didn't do as good a job of erasing, and (perhaps relatedly) the dirtied eraser compound didn't come off the eraser body. It stuck to it. Reminds me a bit of the Pentel Tri-Eraser, which has the same problem.

In case you're wondering, I brought the Tri-Eraser into competition after taking the above scans and photos, and found that it is almost but not quite as good as the Staedtler Mars. It doesn't erase quite as well as the Pentel and Staedtler block erasers, because of that dirty-eraser-compound-sticks-to-the-eraser-core problem. The one advantage it has over the Staedtler Mars is the same as Dave found: Not as much smearing as the Staedtler Mars did.

So, there you have it: The Staedtler Mars does a good job, but the Pentel ZEH erasers (assuming the ZEH-10 and -05 are made of the same stuff) are both slightly better and a bit cheaper.

My homemade A7 notebook

 

2010-07-19 18:14:32 UTC

I wanted a Moleskine Volant, but I didn't want to pay $3 each for them.

So I made my own notebook instead. It's A7, which is just a little wider than the Volants I'd been looking at.

Overall shot of the notebook.

I'd initially lettered the cover (to distinguish front from back) by hand, but wanted to make it a little more professional, so I bought a Fiskars Ultra ShapeXpress shape-cutter. Here's a video showing it in action. I printed out a template of the cover text, cut it out, and filled it in with my pen.

The notebook is ruled, and I keep a Zebra TS-3 mechanical pencil clipped into it.

Photo of me holding it open.

Here's the PDF of the rulings. I printed it double-sided onto regular copy paper. Obviously, I made it for US Letter, but it would be no different for A4, because each section is a little larger than A7, for reasons that will become clear in a moment.

Once printed, I cut the sections out with a paper-trimmer, then used a “medium” rounded corner punch, bought at Target in their scrapbooking section, to round off the corners (square corners will bunch up).

The cover is scrap cardboard from one of my T-shirt packs, cut to size using scissors (plus a ruler and pencil to mark where to cut) and rounded off with the same punch.

The binding is simple enough: Two staples in the spine of the book. This is why the sections I cut out are slightly larger than A7: Each page is A7, but I included a 5 mm gap between pages for the staples to go in. (This matters more for the outer sheets than for the inner ones.) If I were to leave out this gap, or shrink each notebook page by 2.5 mm to compensate, it would be possible to get four notebook sheets instead of three from an A4 sheet.

With this, I have a pocket-size notebook that's very inexpensive (being made from materials I have anyway), recyclable, and customizable to my taste. For a future notebook, I might make it with half ruled pages and half plain pages.

Centimetric ruler/measuring tape

 

2010-07-03 08:52:46 UTC

One mistake a lot of people make when trying to learn the metric system is trying to memorize and use conversion factors. Do you think people in other countries measure everything in inches and then convert to centimeters?

No, they have measuring tapes and rulers in centimeters or millimeters. Such rulers are easy to come by here in the US, but the measuring tapes are not.

So, in order to solve that problem and make it easier for fellow Americans to measure lengths in metric units, I present my Centimetric Ruler. It totals 2.5 meters, and looks like this:

Tick marks every 1 mm, with numbers over centimeter marks.

Despite the name, I use it as a measuring tape, coiled up and held in that shape (when not in use) by a small rubber band.

The page is US Letter (because that's the paper I have), and you'll need to cut out the pieces and tape them together. I recommend cutting through the tick marks so that there is no gap between them and the bottom of the “tape”.

Note that every 25th centimeter appears twice in the printout. This is to give you one centimeter in which to lay each segment over the previous/next one.

There's nothing I can do for you for measuring mass (but scales that measure in grams are easy to come by; you can buy a digital one at Target for $20), but volume is easy, and demonstrates the elegance of the metric system pretty well:

  1. A liter is equal to the volume of a cube that is 1 decimeter (= ¹⁄₁₀ meter = 10 cm) to a side. That volume is 1 dm × 1 dm × 1 dm, or 1 dm³—one cubic decimeter.
  2. ¹⁄₁₀ of a decimeter is one centimeter (¹⁄₁₀₀ of a meter).
  3. Imagine, or construct, a cube one decimeter to a side. Starting from one corner, make a cut in each edge, one-tenth of the way from the corner. This will produce a cube that is one centimeter to a side—one cubic centimeter.
  4. Note that this cube is ¹⁄₁₀ of the larger cube in each dimension, which means its volume is (¹⁄₁₀ × ¹⁄₁₀ × ¹⁄₁₀) = ¹⁄₁₀₀₀ of the volume of the larger cube.
  5. The volume of the larger cube being one liter, the volume of the smaller cube is ¹⁄₁₀₀₀ of that. ¹⁄₁₀₀₀ of a liter. One milliliter.
  6. QED: One cubic centimeter (1 cc) = one milliliter (1 ml).

Knowing how volume and length relate to each other in metric, you can use the measuring tape (most easily on cuboid objects) to measure volume as well.

Audio

 

2010-06-20 21:28:49 UTC

Matt Legend Gemmell tells you what to do and what not to do when making a product page. One point I felt worth expanding upon:

Either have a professional-sounding voiceover, without pauses and “um”s, with great audio quality, or don’t have a voiceover at all. Superimpose explanatory text titles instead. Be honest with yourself about how your voice sounds. If you’re the typical male engineer, your voice is probably going to be a major turn-off, and you probably can’t do talk-along without pausing, making various noises, and restarting your sentences. Get someone else to do it, or use text.

There's nothing you can do about the innate quality of your voice, and if that sucks, then “get someone else to do it, or use text” is good advice. (Alternatively, you may be able to train yourself or be trained to speak better, depending on your exact problem. Mine used to be that I didn't open my mouth enough, so everything sounded like I was talking through clenched teeth.)

But audio quality is something you can improve, and it matters. Care about this stuff; your potential customers do.

  • Buy a microphone. Yes, your laptop has one built-in. It sucks.

    The microphone itself may be all right, but it's in indirect physical contact with a fan, a hard drive, and other noise-inducing parts. It's also too far away from you. Good enough for voice chat, but not for recording. Buy a separate microphone and record with that.

  • Practice good microphone technique. Get fairly close to the microphone—about 6 inches/15 cm—and talk straight over it. Talking over it will avoid loud spikes (pops) on the recording from plosive sounds, such as the start and end of the word “pop”.

    You could buy a pop-filter and then talk straight into the microphone (through the filter), but I'm trying to keep your monetary and effort expenses low.

    Also, if you're soft-spoken, speak up, like you're talking to someone down the hallway. Don't yell, but do project.

    And no matter what you do, don't ever, ever touch the microphone, its stand, or its cord.

  • Set your gain. In simple terms, your input's gain is how hard the microphone is listening. You want to avoid clipping—that's where the signal maxes out (0 dB) and would go out of bounds if it could. You want the signal to be high enough for your voice to be clearly audible, while never, ever going high enough to clip.

    You'll generally do this in the Sound pane of System Preferences, but your recording software may have its own control for this. Sound Studio does.

    The only way to find out the right amount of gain for you (and your microphone) is through experiment. Say something over and over while cranking up the gain, then go into actual recording, and when it clips, dial it back down and start over.

    Note that it is pretty hard to set the gain too low, except when it's obviously too low, but it is very easy to set it too high. Err on the low side.

  • Edit. There are three components to this.

    • Cut out ums, ers, pauses, etc. You can record as much of that as you want—speak as you naturally do in recording. Then edit out anything between words.

      On a related note, pause for a second or so between sentences, both to breathe in and to make it easy for you to edit in re-takes.

      You may also want to write and print out an outline of the points you want to hit in your voice-over, as a map through the presentation for you to follow. Use OmniOutliner or TaskPaper, or pencil on paper (as long as you can read it easily). Read items between sentences; don't read while you speak. Don't write a script unless you can pull script-reading off. An outline (or script) will keep you from rambling and focus your sentences, reducing the number of ums, ers, pauses, and pointless sentences you need to cut out.

    • Remove noise. Amadeus Pro has a great tool for this. Use it.

    • Compress the edited recording. I don't mean use a codec, I mean compress the levels—bring the quiet bits up so that they aren't quiet anymore, while keeping the loud bits where they are (without clipping them).

      You should also use AUPeakLimiter (one of the built-in Audio Units), or an equivalent, to crank up the compressed levels to 0 dB. The difference with how you set the gain earlier is that you set the gain to keep your levels under 0 dB, whereas here, you're amplifying to at 0 dB.

      90% of screencasts are not loud enough. I do not appreciate having to crank up my system volume to hear you. You can fix this.

All of this is not trivial, but it's not hard, either. Practice will make it easier, and the result—clean audio on your screencast (or podcast)—will be worth it.

An iTunes imagine spot

 

2010-06-10 12:49:28 UTC

Nik Fletcher writes:

If you’re an iPhone developer, you’ve probably been using AppViz, AppFigures or AppSales Mobile to download an process your iTunes sales reports. Today, however, Apple have released a new app of their own: iTunes Connect Mobile (iTunes Store Link)..

Wouldn't it be cool if they released a version of iTunes Connect that could upload music and movies as well as view app statistics?

Imagine, for example, a moviemaker recording a movie on their iPhone 4, editing it in iMovie on their iPhone 4, and uploading it to iTunes from their iPhone 4.

Useful iTunes smart playlists

 

2010-05-20 23:00:22 UTC

All of these are “All” (logical and/set intersection) playlists.

Music only

  • Playlist is Music (Library)
  • Kind does not contain “URL”
  • Kind does not contain “stream”
  • Kind does not contain “ideo” [sic]
  • Kind does not contain “PDF document”
  • Genre does not contain “Comedy”
  • Genre does not contain “Spoken Word”
  • Genre does not contain “Podcast”

Never played (music queue)

  • Playlist is “Music only”
  • Play Count is 0

≥ 3.5 stars

  • Playlist is “Music only”
  • Rating is greater than ★★★ · ·

iPod

The goal of this playlist is a balance between churn (so that I keep hearing music I haven't heard in awhile) and quality (so that a bad or mediocre song does not take up space on my iPod that could have gone to a great song).

  • Playlist is “Music only”
  • Skip Count is less than 3
  • Playlist is “≥ 3.5 stars”
  • Time is less than 25 minutes (25:00)
  • Limit to 6 GB selected by least recently played

Customize standards and limit to your requirements.

Classical music (mostly excluded from this playlist by the Time criterion) enters my iPod through a separate playlist: a smart playlist selecting 12 hours of least-recently-played material from my “Programming music” dumb playlist.

Often-played but unrated music

If you're like me, you have a lot of music that has racked up more than a few plays, but that you never rated. Most of this predates my installation of I Love Stars, with which I've rated nearly all of the music I've added since then.

By listening to this playlist with I Love Stars running, I'll be able to rate all of these songs and so give the good-to-great ones a shot at being on my iPod. (I used to have “Play count ≥ 5” in the iPod smart playlist, but not everything that I have that has 5 or more plays merits inclusion on my iPod.)

  • Playlist is “Music only”
  • Play Count is greater than 4
  • Rating is · · · · ·

Even more free music statistics

 

2010-05-16 02:28:15 UTC

Some facts and figures:

  • I got tired of waiting for music-queue zero and added the SXSW 2010 music to my queue on April 9th.
  • My music queue before adding the music was 367 songs totaling 1 day, 4 hours, 17 minutes, 11 seconds (under 1.2 days).
  • The 1,038 songs from SXSW 2010 totaled 2 days, 18 hours, 13 minutes, 15 seconds (about 2.75 days—my prediction was 2.5 days).
  • My music queue after adding the music contained 1,405 songs totaling 3 days, 22 hours, 30 minutes, and 26 seconds (about 3.9 days) of music.
  • I finally started listening to the SXSW music on April 18th, 9 days after adding it. That is, it took me 9 days to listen to the 1.2 days of music that preceded the SXSW music in the queue.
  • I have just finished listening to the SXSW 2010 music, early in the morning on May 16th, a month and a week after adding it and 28 days after beginning to listen to it. That is, it took me 28 days to listen to the 2.75 days of SXSW music.
  • My music queue, now empty of SXSW songs, has 1,199 songs totaling 3 days, 14 hours, 39 minutes, and 30 seconds (about 3.5 days) of music remaining. This includes 34 full albums, not counting samplers.

Maybe I'm beating a dead horse at this point, but there's a lot of free music out there.

Non-obvious solutions

 

2010-05-09 23:19:06 UTC

I've started a site cataloging non-obvious, simple, superior ways of performing everyday tasks.

The visual theme is Fluid by Andrew Wilkinson, with a custom background image I made in Pixelmator:

Feel free to use that image on your own site.

Those who've bought iPads have noticed that the iPhone API documentation comes in a special iPad-optimized flavor:

Basically, like an iPhone app for viewing the iPhone documentation. Here's a screenshot of the page in Safari on my Mac.

Yes, that's desktop Safari showing it.

Contrary to my expectation, it does not use user-agent sniffing to detect an iPad. In fact, it's detected by a JavaScript script (credit) when you go to an iPad-specific front page.

The code has a debugging feature, which they left in and you can (for now) enable to use the iPad display mode in your WebKit-based browser. Here's how to enable it:

  1. Open any page on developer.apple.com.
  2. Open this URL:

    javascript:localStorage.setItem('debugSawtooth', 'true')
  3. Go to the iPad documentation list.

There are actually two interfaces, corresponding to the two orientations of a physical iPad. The one I showed above, with the API tree in a sidebar, is the landscape orientation; portrait moves the API tree into a pop-over, under a button labeled “Library”. The page chooses one or the other by the aspect ratio of the window.

“Sawtooth” has some drawbacks:

  • On a Mac, your scroll wheel (or two fingers) won't work; you must drag the interface instead, which corresponds to finger-dragging on the actual device.
  • Once the interface loads, its size and orientation are fixed; it won't adapt to a window resize until you reload. This, too, is only a problem on a Mac (you can't resize your iPad).
  • There's no way to copy a link to a specific document, unless you can find an internal link (the API-tree table view doesn't count). This can be a problem if you want to link to, say, a framework reference.
  • You can't get the Sawtooth interface unless you go through the iPad front page. If you go to a framework reference, class reference, programming guide, or other more specific page, you'll get the regular interface. Same thing when going through the regular front page.

Even so, it's pretty spiffy. I wish I had a version with all of the above problems fixed for viewing Mac API documentation.

* Credit: JR Ignacio found the JavaScript code and excerpted it into a GitHub paste.

As with all undocumented private APIs, this one may change or go away any time. Use with extreme caution or, better yet, not at all.

As you'd expect from a CGS function, you'll need a CGSConnection to use this one:

typedef void *CGSConnectionRef;
extern CGSConnectionRef _CGSDefaultConnection(void);
extern unsigned CGSSetSystemDefinedCursor(CGSConnectionRef connection, unsigned cursorID);

(I am, of course, not sure of the correct type for cursorID, although it is 32-bit.)

The valid cursor IDs range from 0 to 8; for anything else, CGSSetSystemDefinedCursor returns kCGErrorIllegalArgument. You'll also get that error if you pass a bogus connection ref.

Here are the cursor IDs, as I've named them:

enum {
    kCGCursorIDArrow,
    kCGCursorIDIBeamComposite,
    kCGCursorIDIBeamInvert,
    kCGCursorIDLink,
    kCGCursorIDCopy,
    kCGCursorIDArrowWhite,
    kCGCursorIDContextualMenu,
    kCGCursorIDPinwheel,
    kCGCursorIDHidden,
};

IBeamComposite is the normal I-beam cursor. IBeamInvert is a variation that inverts what's underneath it, instead of compositing over it. The benefit is that this shows up well on dark backgrounds (it appears white), whereas IBeamComposite blends in.

Link and Copy are the Mac OS 8.5 versions of those cursors, not the larger full-color ones introduced in Mac OS X 10.2.

ArrowWhite is exactly what it says on the box: A white-with-black-outline version of the standard Mac arrow cursor. The colors of the Windows arrow cursor with the stem length of the Mac arrow cursor.

ContextualMenu is my rough interpretation, as the stack of white rectangles next to the (black) arrow cursor looks only vaguely like a series of menu items. To my eyes, it looks more like a stack of giant hard disk platters (like the standard icon for a database that has become common recently) than a contextual menu, but I doubt that this was what they meant. This is not the contextual menu cursor from Mac OS 8 and 9.

Pinwheel is exactly what it says on the box. It's even animated. This is the prize of the collection: If you ever want to deliberately put on the pinwheel cursor (which you should NEVER EVER DO), this is the way to do it.

Hidden is also exactly what it says on the box: A fully-transparent cursor image.

So, there you go, for your information, entertainment, and hopefully not use.

My new movie-watching mode

 

2010-03-31 19:36:39 UTC

The DVD drives in the last few years' Mac models are quite loud. When watching a movie from a DVD, it sounds like I have a very-high-speed fan only a few feet from me, only without the cool breeze.

This is a problem because I keep my sound volume cranked way down (to the benefit of my hearing), so the DVD drive effectively drowns out the movie. I don't have this problem when watching a video from a hard drive or the internet.

So here's what I do:

  1. Copy (straight across—no decrypting) the DVD to my media hard drive on my desktop machine.
  2. Eject the DVD, put it back in the case, and put the encased DVD away.
  3. Watch the movie in VLC.

Yesterday, I successfully tried a new variation on this procedure:

  1. Copy the DVD to my media drive on my desktop machine.
  2. Eject the DVD and put it away.
  3. Make the Movies folder on the media drive a shared folder.
  4. With the desktop machine downloading stuff from the internet or maybe seeding a (legal) torrent, go on my laptop in another room and mount the desktop's Movies folder on the laptop.
  5. Watch the movie (in the mounted shared Movies folder) in VLC.

You'll notice that I did not copy the movie to the laptop. I opened the copy on the mounted local share, so VLC on my laptop was effectively streaming the movie from my desktop.

This requires a bit of tweaking in VLC's Advanced Preferences. The default settings waited too long to read more data from the “disk”, so the movie was jerky. I fixed this by appending a couple of zeroes to the latency fields for the three relevant “access modules”: DVD without menus, DVD with menus, and file. (You may only need to set the last one; it didn't work right until I set that one, and once it did, I didn't do any further investigation.)

Once I'd made those small changes, the movie streamed fine over the local network.

Having a succession of aging blog-post lists of sources is going to get old fast, so I've written down my current list of free-and-legal-music sources in a new permanent web page.

From now on, if you ever want to tell somebody just how much music is available for free, that's the place to send them.

Bubble Trouble’s high-quality music

 

2010-03-23 21:58:10 UTC

Does this sound familiar to you?

That's the full version of “Coconut Island” by Matt Swoboda. You may know it better as this shorter version, which is the version used as the alternate level-set-1 background music in the original Bubble Trouble.

Curiously, the Mac OS X version of Bubble Trouble omits that music, although it does include the four other music tracks as 'snd ' resources. All five tracks originally came as MAD files; here's an archive of the MAD files, rescued from the original Bubble Trouble's Mac-OS-only installer, for your listening/converting pleasure.

Among the five tracks are two others by Swoboda, composed specifically for Bubble Trouble. The other two are by Yannis Brown. The full song list is:

  • Level set 1: “Bongalonga” by Brown
  • Level set 1 (alternate): “Coconut Island” (Bubble Trouble edit) by Swoboda
  • Level set 2: Composed specifically for Bubble Trouble by Swoboda
  • Level set 3: “Chunga-babe!” by Brown
  • Level set 4: Composed specifically for Bubble Trouble by Swoboda

You'll need PlayerPRO to play or convert the MAD files; Vox, which I normally use to play and convert modules, does not support MAD. Also, you may find that PlayerPRO doesn't work under Mac OS X; I used 5.10.0rc2, and it did nothing but crash when I tried to load a module file. (UPDATE: It's mostly fixed in trunk@r110—no crash, but oversampling now distorts the audio.) I had to run 5.9.8 under SheepShaver (which is also how I installed the original Bubble Trouble, which is otherwise locked away in that Mac OS installer).

Enjoy.

Dickey’s Barbecue Pit

 

2010-03-20 19:45:06 UTC

I ate at the Dickey's in Huntington Beach for the first time tonight, and decided to write up my observations.

(ADDED 2010-07-04: The Dickey's in Huntington Beach has closed.)

The place is very obviously a chain. The first thing you notice upon walking in is that the decor is not the burned-wood-and-horseshoes type you usually see in barbecue restaurants. It looks more like a fast-food restaurant, and, in fact, that's what it is (slogan: “Slow cooked, served fast”).

If I were to describe it pithily, I'd call it the KFC of barbecue. Like KFC, it serves a type of food that most fast-food chains don't touch; the main difference is which type: fried chicken vs. barbecued meat. One particular similarity is their acknowledgements of their founders in messages on the walls: for KFC, it's the famous Colonel Sanders; for Dickey's, it's Travis Dickey.

Here's their drinks menu:

  • Big Yellow Cup (32 oz.), $1.99

That's it. That's the only size, not counting the smaller size included with the kid's meal.

Both sizes are a hard-plastic yellow cup, similar to what you used to be (maybe still are) able to get at AM/PM and some other convenience stores. The cup calls itself a “souvenir cup”, but otherwise looks like it's intended to be refillable. I don't think you get a discount for that, but you can at least feel good about not throwing away cup after cup.

One nice touch: At every table is a roll of paper towels.

You can buy meat by the plate or by the pound; the former option, which is what I went for, comes with two sides and a roll.

Curiously, the baked potato counts as two sides. It's a large potato, and comes with a full suite of toppings: Two individually-wrapped four-triangular-sided thingies (what do they call those?) of sour cream, a cup of chives, a cup of bacon bits, three tubs of “whipped spread” (essentially margarine), and I think one or two other things. All of that occupied an entire second plate, next to the one that had my brisket on it.

They offer six types of meat: Beef brisket, Polish sausage, pork (two kinds), chicken breast, and turkey breast. I had beef brisket. It was good. It cut easily, sometimes a little too easily (falling apart under my fork). I eventually settled on scooping it onto my fork with my knife.

The sauce is not too spicy, but you will want to alternate between the meat and either the roll or cole slaw, or else the heat will accumulate. It's not unbearable, but it drowns out the rest of the flavor. They also have a “hot 'n' spicy” sauce.

I will go again sometime.

My Amadeus Pro sonogram preset

 

2010-03-15 00:37:07 UTC

When I do audio editing in Amadeus Pro, I find its Sonogram command useful. That command gives me a three-dimensional graph of frequency distribution through time:

Where x = time, y = frequency, and z = amplitude.

The default setting shows the z axis with a color gradient of white through orange through blue to cyan, which I found hard to read. What you see above is my variation on the built-in “Greyscales” preset: Just like a printout, white is dead, black is maxed.

The difference with my preset is that the original is linear, whereas mine is a curve. Here's the preset editor, showing my preset:

The “Grayscale Nonlinear” preset.

Sampling the swatches in that screenshot will tell you that the five equally-spaced gradient stops are:

  1. White
  2. 50% gray
  3. 25% gray (at the halfway point)
  4. 12.5% gray
  5. Black

I've found that these settings make the spectrogram clearly readable without my having to fiddle with the “range” and “gain” sliders.

Capture Cursor

 

2010-03-13 14:41:03 UTC

Most people don't know how to get the cursor that's currently on the screen—a useful ability, especially if you're writing screenshot or screen-recording software. I've written an app that demonstrates the technique, or at least tries to.

It's a bit flaky. The API it uses, IOFramebuffer, doesn't tell me how many frames there are or what format they're in, so the app assumes ARGB in native byte-order and doesn't worry about frames. This gives wrong results more of the time than I like.

I've filed a request for a higher-level API, which would make the task much easier and the app much shorter.

I've posted a build in the repository's downloads area, in case you'd like to see it in action. If you want to build it yourself, you'll need to download SGHotKeysLib and put the source where the Capture Cursor Xcode project expects it to be.

UPDATE 2010-08-28: I've pushed a change, [9cbec7dd5169], that deletes the IOFramebuffer-based category method and uses Snow Leopard's new, far more reliable [NSCursor currentSystemCursor] instead. I suggest you do the same.

The Green Checkmark of Acceptance

 

2010-03-13 00:13:24 UTC

Here's how answers to a question on Stack Overflow appear to the questioner:

Every answer has, below the helpful/unhelpful buttons, a hollow checkmark button.

When the questioner clicks on one of those checkmarks, it marks the answer as the accepted answer to that question, and changes the checkmark from a gray stroke to a green fill.

Everybody else reading the question will see, below the questioner's name, an indication of how many of their questions have accepted answers. Today, for example, my questions have:

Peter Hosey
23.1k 2 14 28
67% accept rate

This indicates that I have accepted answers on four-sixths of my questions.

Sometimes, I see a comment like this semi-fictional example (written by me, based on several real examples I've seen) on a question whose author has a low or zero acceptance rate:

0% accept rate? You really should accept answers on your questions, or people may not answer any further questions from you.

This is a bad reason to accept answers.

The real reason to accept an answer is that you believe it's the correct answer.

Sometimes questioners choose bad answers (deprecated APIs, hacky solution, etc.). When that happens, it's a problem because it may lead future readers astray—they may think that this is the correct answer (because the questioner said so), without reading the other answers or the comments and finding out that this way sucks and/or there is a better one.

The same problem happens when a questioner accepts an answer because they think they have to, out of some sort of social obligation, rather than because they truly believe it is the correct answer. They may not have the correct answer yet, or there may not be a correct answer yet, but they feel like they have to accept something, so they accept the best answer they have, however good or bad it is, solely to raise that all-important number.

That sucks.

Questioners: About a day after asking a question, you should return to it, read all the answers, try them in descending order by votes, and accept the one that works and is the least hacky, for the benefit of other people who have the same question you asked. Take comments into account—something may not look hacky, but a comment may point out the hackiness.

And if there is no good answer, you don't need to accept anything. For the same reason (the benefit of future readers), you should leave the question open.

It's OK to have an acceptance rate that is below 100% or even low, as long as you are accepting answers that you find work and are non-hacky, on as many of your questions as you can. As long as you're making that effort, you're doing it right.

People who post comments like the one above: Why are you so desperate for karma? It's not like it's scarce or valuable. Net scores on answers are meaningful (usually), but your personal total, like mine, is next to meaningless. It's a reward, yes, but an empty one, so I don't see why you get all hurt when you perceive a risk that someone may not give it to you.

In summary: Don't worry about it. Accept correct answers, write correct answers, and don't worry about your acceptance rate or anyone else's.

Cocoa and Cheesesteaks, March 2010

 

2010-03-06 19:17:13 UTC

CocoaHeads Lake Forest is this Wednesday, the 10th, at 7 PM. If you're attending, let's have dinner at 6 PM at Philly's Best in Lake Forest:


View Larger Map

Bad Behavior has blocked 250 access attempts in the last 7 days.