Thursday, 8 November 2007

Wednesday, 7 November 2007

Leopard Installs Not Always Problem Free

After the customary until-you-cant-take-it-anymore 30-minute waiting period, I installed 10.5 Leopard on the Mac mini that serves my local network.

The mini isn’t my primary work machine, and it’s regular duties are fairly straight forward: transport backups, be invisible.

As such, the upgrade was quick and straight-forward (but I wasn’t really paying attention, I was working while all this was going on). After restarting the it was back. I poked around a little, started investigating CalendarServer and decided that the spit-and-polish on the UI would in fact make me more productive1 so I started the upgrade on my primary workstation.

This was a bad idea.

After the intial upgrade, one of the handful of third-party PreferencePanes or Startup Items sent the Finder into an infinite loop of crash and relaunch and crash and relaunch repeat until hard restart.

Two re-upgrades later, I determined it wasn’t bad installs, and firewire-moded into trash anything that may be interfering with the Startup process2.

While this process gave me Leopard, I’m still recovering days later. Not yet back to where I was in Tiger.

The archive+install ate my /local directory, so I needed to re-install svn and mysql (thankfully I left myself a reminder). The ruby mysql gem needed to be recompiled and I’v lost my VPN configuration. All of which were running just fine previously.

There are 3 more Macs in the house scheduled for upgrades. None of which I’m prepared to dedicate the same amount of time on as my primary machine. Yes, I’m gun shy.

1. There’s a Jobs’ Reality Distortion Field for you.
2. M-Audio, Wacom, and Tivo are all suspects.

Tuesday, 6 November 2007

The Performance Power of MySQL Index

I’m at the point in the development cycle where performance is the worth working on, for two reasons; everything else that’s going in is in, it’s too slow.

After one too many out-of-memory errors and far too many times wondering if I should have purchased a larger server to begin with, I sent an SOS message to McClain.

I’ll paraphrase his response, “You don’t have any indexes in your database. Get some.”

I took McClain’s advice and drew up a migration to add indexes for any table with a *_id in it, and a couple heavily-used non _id columns.
add_index :publishings, %w(item_id feed_id)
remove_index :publishings, %w(item_id feed_id)

The results in my feed parsing engine are stunning.
Before indexes: 50-60 seconds / feed
After indexes: 10-12 seconds / feed

Friday, 2 November 2007

Local-Ownership Arguments Loco

“If the small operations want to stay in business… they have to innovate.” – Wolfgang Puck

I’m with Puck, I don’t buy the argument that big national operations take money from smaller locally-owned operations. If anything, big name presence is proof a viable, stable market exists. Would it be better if Puck didn’t have a presence here and wasn’t pushing for locally grown food sources? No.

Should we all eat at Buffalo Wild Wings instead, simply because it’s headquartered here?

The premise that shopping at a national operation isn’t shopping local is bizarre for a number of reasons:

  1. The people working there live locally.
  2. Much of the business’s income needs to stay local to just to pay for continued presence (rent, marketing, salaries, utilities).
  3. And in the case of 20.21, the food itself is regional if not local.

Now, flip the argument around – Minnesota is home to many national brands (Target, 3M) – are we going to stop giving them money because they have locations elsewhere?

No, that makes no sense. In the same way the trade deficit doesn’t make sense.

Project Launch: Sun Developer – Participate Masthead Menu

I just got word that another of the Sun Developer projects I’ve been working on lauched today:

Now in addition to masthead-level access to Java APIs (you’re welcome), there’s a prominent menu item for all the community venues within the Sun.com domain (blogs, wikis, forums, SDN Share, etc). This change lets the ‘Communities’ menu (at the top of the screen) focus on affinities/projects, rather than needing to accommodate all the communities and all the ways they might publish.

When Do We Throw It All Away?

First off, I’m all for minimizing landfills and maximixing the use of our resources. But, I’ve been thinking more and more about the economics of ‘recycling’ since listening to Mike Munger on EconTalk in July.

Right at the start of the podcast, Munger asks,

“I have something in my hand, I want you to guess, is it a resource or is it garbage?”

Surprising, it’s a pretty straight-forward answer,

“Would someone pay you for it or can you make something from it that’s higher value?”

Hmmmm.

Every month we pay someone to haul off our garbage in one truck and our ‘recycling’ in another. We’re not paid as the second truck drives by. Plus, the reason the items are on the curb to being with is that I’m done with them.

Earlier this autumn, when our kitchen was demo-ed, the contractor set a number of the old metal pieces aside the dumpster. After sitting there for a few days, a single beat-up pickup truck rolled by real slow, and a kid – no more than 14 – jumped out, quickly sorted throw the metal, threw a couple pieces in the truck and hopped back in.

If there was a market for ‘recycling’, I imagine we’d see lots of trucks competiting for whatever’s in my orange and green bin every other Tuesday.

Instead, metal, glass, plastic, and paper go into the same bucket (“single-sort”) and transported by one of only 3 vendors to an amazing $3 million machine sorting through everything. Salvaged materials transported to mills and ‘spoilage’ transported to incinerators 1.

I don’t know about the exact margins in all those transactions, but they feel pretty tight – especially considering all the transportation involved.

In addition, there doesn’t seem to be a strong push by my waste vendor or the city for making sure what goes in the single-sort bins are actually ‘recycleable’. No weekly report from the waste hauler on my compliance this month. Simply a few bullet-points encouraging me to rinse glass and cans out.

From this, I can only conclude that spending our time and clean water cleaning waste is the only way to make it valuable again. That doesn’t sound like a good deal holistically, especially with that multi-million dollar sorting robot downstream.

Makes me wonder when the costs of driving 2 trucks around will become too much and our waste haulers will take back one of their buckets leaving us to truly single-sort.

Elsewhere 13 Aug 2007

“However, there is one cost that no one acknowledges: the time spent preparing items for recycling. No one mentions it because it’s done by you, free, in your own home.” – Tim Worstall

1. Assumptions I made from the details in the meeting notes from Anoka City Council Oct 3, 2005 [pdf].