Archive for March, 2006

iPod, Volume Limiting, and Constant Phantom Ringing Noises.

Thursday, March 30th, 2006

Recently, Apple released a software update for the latest iPods that adds password protected settings to limit the volume of the output. Whether or not this has anything to do with a rather stupid lawsuit, I have no idea. The stupidity of the lawsuit is obvious and is not the point of this.

This is a feature I’m looking forward to using.

I often find myself listening to music on an airplane. Usually, I’m using a very good set of relatively efficient headphones. Efficient? Yes — some headphones are much more effective at turning electricity into sounds than others (which is why the lawsuit is stupid).

Now airplanes tend to lay down a fairly loud noise floor. The instinct is turn up my headphones — which are relatively open because my ears freak out with closed air ‘phones.

A few times prior to any kind of volume limiting, I walked out of a plain with my ears ringing even though I didn’t think I had been listening to music that loudly. The noise floor got me. It is impossible to tell how absolutely loud something is in relation to a relatively loud noise floor.

So, the volume limiting is actually quite useful. I can set the maximum volume of my iPod to something loud, but not too loud, in a quiet room, then not have to worry about ripping my ear drums out when trying to listen to music in an otherwise fairly loud environment.

I can also hand the iPod to my five year old son with the controls enabled such that he feels in command without having to worry about him destroying his ears.

And because the limit is variable, I can easily set it depending on what headphones I happen to be carting with me.

(I can’t do the ear buds because my ears turn red, swell, and become painfully itchy…. and I really don’t like the noise canceling things due to bulk and general squishing-my-ears feeling that leads to the red/swell//itch thing.)

Best. Salmon. Ever.

Sunday, March 26th, 2006
Stuffed Salmon Ready to Grill

Yesterday, Ben and I set out to cook a salmon on the Big Green Egg. We picked up a whole salmon at the farmer’s market. $36 for 7lbs of the freshest, most beautiful, chunk of Salmon I have ever worked with. I then did a horribly job of deboning it — Salmon doesn’t work quite like bass — but still managed to effectively butterfly the fish and leave the filets largely intact.

As seen in the picture, we stuffed it with tangerines, onion, fresh dill, ginger, brown sugar, red wine followed by a salt rub on the outside. After sitting in the fridge for a couple of hours, we grilled the salmon on the BGE at 200 degrees until the internal temperature hit 120 degrees. As the internal temperature of the salmon crossed 95, we gradually reduced the BGE temperature to about 180. After letting the salmon rest under foil for 10 minutes, we dug in with a fine glass of wine in hand.

It was the most sublime salmon I have ever tasted. More tender than lightly poached salmon, but with all the complex flavors imparted from grilling. Since it was grilled as seen in the picture, the grill flavors were pretty mild. Next time, I think I’ll cook at a slightly lower BGE temperature and the salmon laid open on the grill grid.

The BGE is proving to be an absolutely amazing piece of grill engineering. The temperature is just rock solid stable and the key to success is a thermometer in both the thing being grilled and in the BGE itself. Then, do not ever open the BGE unless you explicitly need to adjust the food itself.

Next up? Either a smoked turkey or ribs…

AppleScript for the rest of us

Friday, March 24th, 2006

Of all the programming languages I have learned, there are two that have consistently made me feel stupid.

Prolog and AppleScript.

At least with Prolog, I found I could provide it with enough random facts and it would eventually barf back an answer of ‘yes’ for whether or not my assignment was done. And, of course, Prolog has good jokes (thanks, Ray!):

Q: How many prolog programmers does it take to change a light bulb?
A: No.

AppleScript, on the other hand, continues to baffle me. All those english like sentences just confuse me. I constantly try to write code that is, well, like code and it doesn’t work.

Fortunately, there is appscript, a python module that makes any AppleScriptable application into something I can talk to just like any other Python object. This quite effectively reduces AppleScript programming to a programming exercise that my tiny little mind can effectively metabolize.

Furthermore, I can use appscript from within the command line interpreter (read this first to make sure the command line python interpreter is actually useful).

While grabbing appscript, you might also want to download HTMLDictionary. It dumps an appscript compatible HTML document describing any random application’s scripting dictionary.

After installing appscript, fire up the python interpreter and grab a reference to the iTunes application (yes, start it with pythonw — appscript requires a windowmanager connection):

[albbum:~] bbum% pythonw
Python 2.3.5 (#1, Jan 13 2006, 20:13:11) 
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import appscript
>>> iTunes ="iTunes")
>>> print iTunes

Great! Now what?

Read the rest of this entry »

France, DRM, P2P, and the iPod

Tuesday, March 21st, 2006

This is just a bunch of thoughts I have collected so far. I tried to research this relatively well, but I will be the first to admit that I’m very likely misinformed. If you have corrections, please email me details along with links to source material and I will edit as I can.

By now, everyone has read all about France’s partially passed proposed law to effectively make closed DRM illegal.

But it seems that few people have looked beyond the surface.

So far, all of the press has been about how this potential law is a serious challenge to Apple’s iPod and iTunes Music Store. Apple has even responded.

As with anything DRM related, BoingBoing has an article on this and will be collecting more information as this unfolds. Cory’s reaction is that this is “a good step”.

Good step? I’m not so sure. I have attempted to look a little deeper and see just how good it is. First, a brief bit of recent history.

In December of 2005, the French parliament accepted an amendment that would have made legal the free downloading of copyrighted materials from the Internet for private use. This would fall under the “private copy” concept in France which is very much akin to the eroding “fair use” concept in the United States.

Of course, the entertainment and software industry went completely ballistic in response to those proposed amendment. While the amendment survived the lower courts, it eventually died before becoming law.

In January, France’s parliament took a very different approach to the wording of the amendment after a bit of encouragement from the BSA, Vivendi Universal, and other media giants or corporate representatives. The end result was some of the strongest worded anti-piracy legislation proposed.

Click through to read on….

Read the rest of this entry »

Coffee & Cholesterol

Sunday, March 19th, 2006

See the end of the previous post for the source of this. Quick summary: French press coffee contains oils that are potentially linked to increased cholesterol.

The oils are present in french press coffee because they pass through the wire screen in the press’s filter. With a paper drip filter, the oils are left in the paper.

More likely than not, those gold plated metallic reusable filters don’t do any better of a job filtering the oils than a french press. Use therein could potentially contribute to increased cholesterol levels.

So, if you do use paper filters, get the unbleached, all natural, kind and toss them in your compost heap when done. Coffee grounds have lots of nutrients that plants find quite tasty. As an aside, an occasionally cup of coffee tossed on a Ficus tree will do wonders for it.

Has anyone tried shoving a paper filter into a french press? It would be trivially easy to do as the french press’s filter is actually composed of two metal plates that screw onto the plunger to tightly squeeze the screen in between. Adding a paper filter between the screen and the bottom plate would be really easy.

The question is whether forced filtration is going to leave the oils in the paper or if they will be pushed through the paper?

Anyone have any idea how to test for the presence or absence of the oils?

Coffee Stupidity

Saturday, March 18th, 2006

I drink coffee. A lot of coffee. While I certainly drink coffee for the caffeine content and will drink Folger’s drip if I have to (shudder), I like good coffee. Fresh roasted. Grind it myself.

In particular, I prefer french press. Leads to an intensely flavored cup of coffee that really highlights the strengths of the roast and bean used.

As a result, I have a french press and bean grinder both at home and at work. I’m not so anal as to have spent hundreds of dollars on the grinder, nor am I so careless as to use one of those whirling choppers of death to pulverize the beans (those are only good for fine grinding spices).

Which has led me to the discovery of two intensely stupid industrial design mistakes.

The first is with the coffee grinder I use at work. A Braun KMM30. Now, I’m not normally known to be the most tidy of people. Yet, my coffee grinding/brewing area — the top of a filing cabinet — is a complete disaster area of grounds.

Why? Click through for the rest of the rant….

Read the rest of this entry »


Friday, March 17th, 2006

After that long winded post with little useful content….

A few days ago, I finally downloaded and gave TextMate a try. Don’t know what took me so long as I had heard good things about it. I suppose the thought of potentially paying $50 to replace what I could get “for free” with Emacs turned me off.

Wow. Now this is an editor I can use! I will still use SubEthaEdit for collaborative editing, but TextMate is now my editor of choice when not working with Xcode projects.

To sum it up: TextMate takes the philosophy of emacs — giving close to total control to the user for customizing the user experience of text editing — and wraps it up into a simple and sweet Cocoa user interface. Sure, emacs has about three decades of development on TextMate and it is reflected in the power of the modes, but — frankly — the modes aren’t terribly accessible and Emacs hasn’t done a great job of keeping up with modern technologies.

None of this is to say that TextMate has a totally intuitive UI. It doesn’t. There is a definite learning curve. But that is too be expected — text editing is all about hands-on-the-keyboard and that requires learning a boatload of shortcuts.

TextMate has excellent documentation. At least, I have had no problem answering any question I might have by a simple search in the docs.

And it is extensible. I have already started to capture some silly little bits o’ functionality into a bundle.

If you are a TextMate user, you can check out my tmbundle

cd ~/Library/Application\ Support/TextMate/Bundles
svn co

I’m sure the collection will grow over time.

Text Editing

Friday, March 17th, 2006

Text editing is a weird thing. Every developer — nay, every computer user (but not every solitaire player) — has their own “unique” perspective as to what makes for a good text editor. And, of course, everyone else is wrong.

For anyone that has been pushing ASCII for more than a decade, there is guaranteed to be some “glory editor of days gone by” that every editor today is compared against. Yet, somehow, nothing measures up. Never mind that the code or text one was writing a decade ago was completely different than it is today.

For me, I caught the emacs taint almost 20 years ago (sheesh!). And caught it I did! Within a few years, I had a 100K init file. A few years after that, and I had a multi-megabit “initialization environment” that could magically customize itself based on operating system and emacs derivative.

It was awesome. I could code Obj-C or Perl (yeah, I did Perl for a while, too) like a daemon. Everything was beautifully formatted, builds happened in Emacs, yadda yadda yadda….

And then Project Builder was born out of the original Interface Builder (PB was a tab in the main IB document window) and it became the way to build NeXTSTEP apps. Same goes for WebObjects. Fortunately, there were some fellow emacs infected folk on the AppKit team and NSText (NXText) gained key bindings that gave the basics of text navigation and manipulation through a set of emacsen key bindings. (There was also Edit. It kicked butt.)

And time marched on…

Read the rest of this entry »

Useful subversion shell aliases

Monday, March 13th, 2006

A friend tossed me a handful of aliases that, once plopped into your shells initialization scripts, make dealing with Subversion all that much more pleasant. It was one of those “Oh, jeez, that is so stupid obvious… why didn’t I think of that” moments.

Drop the aliases into wherever your shell sets up aliases (~/.tcsrhc or ~/bashrc or something like it, typically). The syntax may be different.

alias M         'svn diff \!* | mate'
alias G         'svn diff \!* | mate'
alias U         'svn diff \!* | mate'
alias R         'svn diff'
alias C         'see'
alias A         'true'
alias D         'true'
alias I         'true'

Once in place, you can now triple-click-copy-paste any line in the subversion output to see more detailed information.

Update: I updated the M, G, and U aliases to both use TextMate and to work fine with multiple arguments (just because it seemed like an appropriately big stick to bring to the party).

For example, an ‘svn status’ on my PyObjC work area outputs the following:

[pyobjc/trunk/pyobjc] bbum% svn status
M      Lib/AppKit/test/

I simply triple-click the M Lib/AppKit/test/ and copy/paste/return. Subversion will then display the differences between what is in my workarea and what is currently in the repository.

The third command will cause the conflicted file to open in SubEthaEdit. Change it to mate for TextMate or bbedit for BBEdit.

In ~/.subversion/config, I have:

diff-cmd = /Volumes/Data/Users/bbum/bin/ lives in my hacques repository. Once in place, it causes diffs to open in FileMerge.

If you don’t want to use FileMerge (or bbdiff), change the two svn diff aliases to clear && svn diff. This will cause the Terminal window to be cleared prior to displaying the output.


Michael McCracken reminded me that I really ought to go look at my application menus a bit more often. Terminal includes Paste Selection (and Paste Escaped Text, another useful idiom I forgot about). So, triple-click, then hit shift-cmd-V to paste the selected line. One less keystroke!

Dominik Wagner mentions that he uses svn diff | see -m diff to cause the diff to be opened and nicely colorized in SubEthaEdit. Very nice.

As an improvement in the above context, I aliased it to svn diff \!* | see -m diff as that fixes two problems. First, it only diffs the file copy/pasted. Secondly, it doesn’t also open the file(s).

Of course, all of this now means that M is an super-tiny abbreviation for Diff This Stuff Now.

Wilfredo Sánchez Vega added the true aliases as seen above. It allows you to copy/paste in a large chunk of the output without having to worry about silly syntax errors. Of course, there are still a number of edge cases — if the other columns are used or ‘?’ in the output — but this makes it much more generic.

The Daily Show in iTunes Music Store

Wednesday, March 8th, 2006

The Daily show is now in the iTunes Music Store.

You can buy it per episode for $1.99 or you can pick up a multi-pass for $10. The multi-pass is, effectively, a pay-for-video-podcast where you will receive the most recent episode immediately and the next 15 new episodes posted automatically.

Not bad. I like discounts for otherwise premium services.

Now, if they would just post the episode about the Taint in Washington….