Cocoa devs fail Data Structures & Algorithms?

I can’t find a linked-list class in Cocoa. Yes, I do want to do middle-insertions, and I’d have a fine time amortising my sequential access to constant time. Fine; it’s not like they’re hard to implement.

The scary thing is that when searching, I blindly fell into the pool of ignorance displayed in this circa-2004 Cocoa-dev thread. To be fair, the OP was more concerned about iterator functionality than a list implementation, but most of the responses seemed oblivious to:

  • The iterator design pattern
  • The time-complexity advantages of a linked-list implementation over arrays and deques (NSArray) and hashes and trees (NSDictionary and NSSet)

Continue reading “Cocoa devs fail Data Structures & Algorithms?”

ruby-mp3info utf-8 support

While apparently there are plans to improve ruby’s support for unicode, the 1.8 stdlib doesn’t make working with encodings transparent. The historically poor support has had its toll on ruby libraries, as I discovered while updating scroball.rb to do the right thing with utf-8.

It led to this patch. On the whole though, it’s of limited use. You don’t see the Id3v2 class from the Mp3Info class, so you don’t get an opportunity to set the encoding up. Even if you did, the implicit assumption that the user deals solely in iso-8559-1 isn’t comforting. Fortunately the characterspace isn’t always truncated into iso-8559-1: strings which fail the iconv transcoding get left alone.

The situation with ruby-mp3info is symptomatic of several legacies: id3v2 and its ad hoc unicode extensions, and second-class support of unicode strings in ruby before 1.9.

SourceForge.net Marketplace spam

It came with the header:

Subject: Turn your skills into cash at SourceForge.net Marketplace

At the very least it was annoying bacn, but it’s really spam.

In May 2007 there was an invitation to register interest in SourceForge’s new Marketplace product. I declined. Evidently sourceforge (or at least the Marketplace product manager) was disappointed in the uptake among developers, and started an opt-out bacn campaign, consisting of sending the same message to developers every few months telling them to check out the new service.

Well, bacn is one thing, but the most annoying thing was the obfuscated unsubscription procedure. The relevant sentence being:

… if you would prefer not
to receive information about SourceForge.net Marketplace, please update your
communication preferences by visiting the Profile Center.

When these emails were sent, there was no text “Profile Center” on the SourceForge marketplace page. There have been some frustrated bug reports as a result.

So it turns out that the “Profile Center” text in the original email (which was small, light grey on white, and had no decorations differentiating it from the surrounding paragraph) was an indirect link (via click.marketplace.sourceforge.net) to the Profile Center. The Profile Center leads to the Subscription Center, where

If you wish to unsubscribe from ALL publications
from SourceForge.net Team, check the box and click the update button
below.

Except that it’s not “ALL publications from [the] SourceForge.net Team”, it’s just the spam from Marketplace.