Archive for September, 2007

I Like Light. And Clear Stuff. And Texture. And Reflections.

Saturday, September 29th, 2007
Odd Planet 1

I like this photo and had fun taking it.

So I’m posting it.

Maybe someone else will enjoy it, too.

Click on through to see how the shot was taken.

Read the rest of this entry »

Does 75 lbs of smoked pork fit in my fridge?

Saturday, September 29th, 2007
Fridge Full O' Pork 3

Yes, yes it does. Pictured at left is 75 lbs of smoked pork all wrapped up and ready to be picked up by a friend as the main course in their friend’s daughters wedding.

It took me four days — 3 overnight cooks — to produce 75 lbs of smoked pork. Each round was about 30 lbs of smoked pork (4 shoulder cuts each round) that had been dry rubbed with my special blend of salts/sugars/spices, then smoked for 22 hours over hardwood lump charcoal with bits of apple wood (that had been soaked in gin and red wine for several days) at a bit over 200 degrees.

Delicious stuff. Took a bit of eating logistics to clear out the fridge enough for the pork.

Now that I have exchanged food for payment, can I drop “professional chef” on my resume?

Nah — probably not without offending real professional chefs.

AmazonMP3: Avoiding the silly auth-requiring installer.

Friday, September 28th, 2007

AmazonMP3 includes a neat little downloader app that integrates the web buying experience with iTunes for album based downloads. Upon purchase of an album, Safari downloads a little document file (.amz file) that contains a description of the tracks you just boat. The downloader application then does a bit of handshaking and downloads the tracks, automatically adding ’em to your iTunes library if you have said preference enabled.

Amazon decided to package the application into some installer app that requires authentication to install the downloader helper. But there doesn’t seem to be any reason why admin access is required for the downloader helper and, as such, all this is doing is creating an unnecessary barrier to entry.

What about amazon customers that don’t have admin access to the machine? How about customers that, on principal, don’t run installers that require admin access unless there is a damned good reason to do so?


As it turns out, if you ctrl-click on Amazon MP3 in the Finder and “Show Contents”, then browse into the “Contents/Resources” folder, the downloader application is sitting right there in all its ready-to-run glory.

Drag and drop that wherever you want. LaunchServices should [eventually] figure out that something exists that can open “.amz” documents and, thus, it’ll all just work.

Drag-n-drop install ftw.

Dark Side of AmazonMP3

Tuesday, September 25th, 2007

Today, Amazon launched their AmazonMP3 digital music store.

From the title of this post, you might think I’m going to reveal something sinister about it.

Nope — just here to point out that Pink Floyd’s Dark Side of the Moon is rapidly climbing the charts. Pink Floyd is the second most popular artist and DSotM is the #1 most popular PF album. However, The Wall seems to be beating out DSotM, making me wonder if Amazon is ranking album sales by # of tracks per album?

No idea. What I do know is that Amazon’s music store is really quite very nice. Beyond selling non-DRM’d MP3s at a reasonable sample rate of 256kbps (VBR, LAME encoded) — though I’d rather have AAC at the same bit rate as it really does sound better — the pricing seems really quite attractively flat.

99 cents/track. Period. If you pick up a 4 track album with 4 20 minute tracks, that’ll be $3.96, please! Fantastic. Gotta wonder if that’ll survive the beta period.

In any case, I picked up two awesome Fela Kuti albums for less than $9/total.

Zombie: This rather brilliant bit of high energy funk jazz sparked a major uprising in Nigeria as it was highly critical of the corrupt government and very popular with the people. It led to the death of Fela’s mother, the destruction of much of his work, and nearly his death. Eventually, it led to Fela taking 27 wives in 1978 to mark the anniversary of the attacks.

OK — wow — some serious history. But, ultimately, it is just an amazing piece of musicianship. One very deep central african groove going on here.

The second album is Fela with Ginger Baker LIVE!. This might just be the very first album release from Feta, though it is hard to tell.

As its name implies, it is Fela and his band playing with Ginger Baker — drummer extraordinaire of whom I have written about before.

The album starts out with Fela sort of introducing the group and about how they are going to just sit down and play some music… 1..2..3..4…holy oh my i just got run over by a wall of amazing rhythm and music.

Great stuff. I’m going to continue hunting through the 20,000 or so $5 or less albums– bound to be some other gems.

No Net Neutraily? Been there, done that, it sucks.

Saturday, September 22nd, 2007

Net Neutrality is a subject of major discussion amongst the neterati. For good reason. The presence of Net Neutrality guarantees that any network connection — residence, business, cable, DSL, satellite — can send traffic without restriction or different levels of dependability based on protoocol or destination. The absence of NN means exactly the opposite; there may be restrictions based on protocol, destination, or anything else the service provider might decide should be singled out.

And, of course, one of the non-neutral models involves the customer paying extra money to gurantee levels of service for certain protocols or features.

The funny thing is that none of this is new. We have been in a non-neutral world before. And it sucked. More on that in a second.

Why is this such a big deal?

– residential DSL and cable modem companies have oversold their bandwidth such that they cannot meet the contract or marketing promises they have made

– those same service providers are pissed off that commodity generic bandwidth is perfectly excellent for carrying products like Vonage or Skype [telephony] or any of the myrida of multimedia streaming or downloading solutions. They want a cut of that.

But none of this is a new issue. We have been here before. Slightly different form, but same impact on the customer.

Full details after the break…

Read the rest of this entry »

A Not Terribly Scientific Study Of Alternative Means of Using an iPhone

Wednesday, September 19th, 2007
Blurry Adam

Bad photo, right? Yup. But, at the moment, it is one of the very few iPhone photos taken entirely by nose control. Special, huh?

Of course, this rather amazing new level in human computer interaction required further investigation.

What can be used to wake an iPhone, unlock it, and take a picture?

  • Toes work. Duh.
  • Stomachs do not work. But it does tickle.
  • A dog’s paw works just fine…
  • … but licking the phone while trying to use it does not work.
  • Nipples do not work. And the screen is surprisingly cold.

Nature vs. Replacing Outdoor Lighting

Sunday, September 16th, 2007
Light Fixture Full of Wasps

Since moving into our ’62 Eichler, I have been slowly upgrading various bits of infrastructure. This weekend, my goal was to rip out the 30+ year old rusted porch light fixture that illuminated about 30% of the chimney and that was only if the bloody thing worked. Useless. Must die.

Unfortuntely, a quick glance with a flashlight revealed quite the extended family of wasps had taken up residence in the fixture. Now, normally, leaving the light on for a few hours would be enough to drive the wasps out. Not so, in this case, as I had long ago replaced the existing watt-burner wth a compact florescent that did not sit well in the ancient socket and, thus, did not work.

So… me vs. the wasp mob.

Fortunately, the nest seemed relatively docile (No clue why– doubled the paranoid factor). And, thus, I was able to slip a freezer bag around the entire fixture and zip-loc it at the top (Christine’s rather brilliant idea — of course, did she volunteer to do the actual baggin?!?! No way!). Insufficient the zip seemed, so I added a couple o’ layers of duct tape. Bit of a difference between “shake shake spill” with food vs. “shake shake spill-oh-crap-i’m-six-feet-up-a-ladder-with-dozens-of-wasps-looking-to-kill-me”.

Wasps in Bag Close Up

Wasps apparently aren’t really into the whole “nest in a bag thing”.

After unscrewing the fixture from the junction box — a tense moment as I had no idea whether or not the wasps could pass through the junction box — the nest went straight from “docile” to “exceedingly pissed”.

Now, I really don’t have anything against wasps. Paper wasps don’t sting — they have a really nasty bite — and, thus, do not tend to cause allergic reactions. They are voracious eaters of all kinds of garden pests.

As well, the wasps are generally non-aggressive. This family had been living on our porce for quite a while. Roger had been bitten once, but he likes to catch the wasps. With his bare hands. Quite good at it, too — knows how to hold ’em so they can’t bite him. Mostly.

They are only really aggressive in the fall after the first few cold nights or first frost. Then their food supply crashses and the wasps get a bit desperate. I’m not exactly sure what wasps due during the winter.

Anyway, I didn’t really want to kill the wasps.

I left the bagged nest in a protected spot until the temperature (and their oxygen levels) dropped off a bit. Once the family calmed down a bit, I took ’em out to the fron yard and cut a corner off zip lock and shook the wasps out on the ground. Amazing, the entire group of wasps crawled off — didn’t fly — and disappeared within 15 minutes.

It’ll be interesting to see if they show up at the location of the new lamp tomorrow. Fortunately, it is relatively wasp proof and, since it works, it’ll deter their return. Unfortunately, one of the stupid spot CFLs I installed burned out within 10 minutes of being turned on and that side of the fixture is currently quite welcoming to the little buggers.

TwistedElephant: A Memory Debugger for Twisted Applications

Saturday, September 15th, 2007

Recently, I was trying to figure out why a Twisted application was leaking memory at a disturbingly rapid rate. In the process of investigation, I hacked up some one-off bits of logging within the target application that used Python’s GC module and my di() hack such that I could explore the active object graph within the Twisted process.

Knowing that I would be faced with this problem again, I did a bit of recreational hacking over Memorial Day and created a primitive, though effective, general purpose Twisted memory debugging tool.

It is called TwistedElephant.

It lives in my personal SVN repository at red-bean:

It includes some quick documentation.

Note that it is a complete hack that was just good enough to solve a set of memory debugging problems that I had at the time. There are dozens of improvements that can be made and likely some great bugs, too.

Patches welcome!

Wired’s 100 Ways to Save Apple, 10 years later.

Thursday, September 13th, 2007

Ten years ago, Wired published an issue of their silly ‘zine that claimed Apple was pretty much dead and listed 100 ways to save the company.

It was hilarious then– full of leadership-by-armchair-comittee style suggestions– and even funnier now. Wired has long been a sort of Mad Magazine of technology and this particular article is one of the funnier demonstrations. There are a couple of good points on the list and — as a friend pointed out — good leadership is about choosing the handful of right ideas.

I lost all respect for Wired — canceled my subscription, even — when they did their “The Web Is Dead, Push Is Here” issue. It was clear that the writer(s) either had no clue at all or where pandering to investors. Given that Wired Ventures had dumped VC into various companies pushing Push technologies, I still suspect the latter.

Thanks to FSJ for posting the article link and cover picture. I still have a copy in my files somewhere. The one issue I kept. It is an effective reminder that doing the expected is often the wrong answer.

Python’s Weakref is weak sauce (but not poisonous)

Thursday, September 13th, 2007

A little bit ago, I released an itty bitty Python module called di that caused quite the kerfluffle. di is simply the inverse of id; di(id(someObject)) will simply return someObject.

Of course, this is incredibly dangerous and a desperately stupid thing to do anywhere but in debugging code (as I noted). Why? Because it is effectively adding all of the fragility of C style pointers to Python. Yay! Bus Errors! SegFaults! Random Objects Where They Should Not Be! Whee!

Pretty much every criticism of di found in the comments section mentioned that Python’s weakref implementation could be used to accomplish the same thing with a little bit of bookkeeping code on the backend.

Nice. Except for the fact that weakref is not a general purpose solution for tracking objects, regardless of type.

Specifically, from the documentation:

Not all objects can be weakly referenced; those objects which can include class instances, functions written in Python (but not in C), methods (both bound and unbound), sets, frozensets, file objects, generators, type objects, DBcursor objects from the bsddb module, sockets, arrays, deques, and regular expression pattern objects. Changed in version 2.4: Added support for files, sockets, arrays, and patterns.

Ouch. In other words, the suggestions to use a simple weakref based system for keeping track of objects will not be so simple (I was debugging memory leaks). I would have to special case for whatever objects can’t be weakref’d and either change their potential lifespan by creating a strong ref to ’em or simply ignor them (or use di(), which is what I did).

So, what can’t be weakref’d (using Python 2.5)?

>>> from weakref import ref
>>> ref({})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'dict' object
>>> ref("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'str' object
>>> ref([])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'list' object
>>> ref(object())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'object' object
>>> ref(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'int' object
>>> class Foo(object): pass
>>> ref(Foo())
<weakref at 0x6a1b0; dead>

Unfortunately, a lot of things can’t be weakref’d. In particular most of the instances of the various classes — dict, array, string, and int — that are used to store away or represent data in applciations cannot be weakref’d.

Or, for my purposes, it pretty much means that using weakref to develop a generic memory monitoring subsystem was out of the question. Not outright impossible, by any means, just very very limited in its general purpose applicability without changing the lifespan of objects in the target app.

Ultimately, I don’t consider this some huge, glaring, gigantic, flaw in Python’s implementation.

That weakref doesn’t work with such fundamental types as dictionaries, arrays, and strings is really quite annoying, but not terribly surprising given the history of the language and the focus on backwards compatibility. It is rare that one would write code that needs completely type agnostic weak referencing capabilities.

To put that last statement more strongly: completely type agnostic containment is an extreme rarity within well designed software architectures.

One exception is debugging tools. More specifically, type agnostic containment without impacting object lifespan is quite valuable within memory debuggers (stupid name: “object population monitoring” or “object census & analysis” is more precise). Fortunately, Python offers some decent tools for interrogating the population of objects currently in existence. The lack of generic weakref makes generation-to-generation tracking more difficult, but not intractable.

Anyway — enough theoretical whining. I spent a bit of Labor day (the other three day weekend that I can’t keep straight) writing a Twisted memory debugger. I’ll drop it on the world in a post or two.