Twitter has rewrite problems

This past week I did some work on Scrawlers to align any search credit received from links to both the scrawlers.com and www.scrawlers.com addresses. I was reminded of this “must do” by Patrick McKenzie over at MicroISV on a Shoestring. Naturally it took me a few months to deal with the issue, but it’s more-or-less done.

More recently we’ve started exploring some ways to make use of Twitter on Harvest. To get familiar with Twitter, and at the encouraging of Eirik Solheim, I signed up for a Twitter account under my moniker as well for Scrawlers.

For some reason I first entered the Twitter URL with those pesky ‘w’s.

Twitter

I was not surprised to see that Twitter rewrites that URL without the “www”. In fact, it made me realize I’m rewriting my Scrawlers URL’s in the wrong direction! What did surprise me is that their URL rewriting is causing an additional forward-slash to make its way into the URL.

Twitter

This doesn’t happen when entering a simple http://www.twitter.com. However, take any more-complex Twitter URL and prepend it with a “www” and you’ll see what I mean. Doesn’t seem to impact usage of the site, but it certainly was something I didn’t expect to see on a heavily trafficked site like Twitter.

Calling MailBuild AddWithCustomFields with Ruby

Today I had a fun trial-and-error exploration of Ruby SOAP messaging. By “fun” I mean “hair-rippingly excruciating.”

Basic SOAP calls are pretty easy with the wsdlDriver inherent in Ruby. Here’s how you’d wrap MailBuild’s Subscriber.Add function in Ruby:

require ’soap/wsdlDriver’

class MailBuildWrapper

  attr_accessor :api_key, :list_id

  def initialize(api_key, list_id)
    @api_key = api_key
    @list_id = list_id
  end
 
  def add_subscriber(user)
    soap     = wsdl.create_rpc_driver
    response = soap.addSubscriber \
                 :ApiKey       => api_key,
                 :ListID       => list_id,
                 :Email        => user.email,
                 :Name         => user.full_name
    soap.reset_stream
    response.subscriber_AddWithCustomFieldsResult
  end

  private

    def wsdl
      SOAP::WSDLDriverFactory.new("http://iridesco.createsend.com/api/api.asmx?WSDL")
    end

end

Calling a simple add subscriber is, well, simple.

u  = User.find(:first)
mb = MailBuildWrapper.new
mb.add_subscriber(u)

Adding with custom fields is different. This is because an array of “SubscriberCustomField” objects is necessary. Finding the magic Ruby incantation to build this SOAP array was a trick. I never found anywhere that said how to do this - Google was not my friend. Here is an example MailBuildWrapper method adding a subscriber with an ‘is_admin’ custom field:

def add_with_is_admin_custom_field(user)
  soap     = wsdl.create_rpc_driver
  response = soap.addSubscriberWithCustomFields \
               :ApiKey       => api_key,
               :ListID       => list_id,
               :Email        => user.email,
               :Name         => user.full_name,
               :CustomFields => {:SubscriberCustomField =>
                 [{:Key => ‘is_admin’, :Value => user.is_admin?.to_s}]}
  soap.reset_stream
  response.subscriber_AddWithCustomFieldsResult
end

So the ‘CustomFields’ hash item needed to point to a hash with a ‘SubscriberCustomField’ item, which itself points to an array of hashes containing ‘Key’ and ‘Value’. So multiple custom fields would be specified as follows:


:CustomFields => {:SubscriberCustomField =>
                    [ {:Key => ‘is_admin’, :Value => user.is_admin?.to_s},
                      {:Key => ‘is_loser’, :Value => user.is_loser?.to_s}]}

Some useful links from my first experience consuming a SOAP web service with Ruby:

Technorati Tags: , ,

Amazon fixes Subscribe and Save

Everyone knows someone who claims to have invented a national catch phrase. For instance, “take a chill pill” originated at my middle school. And I invented the term “redonkulous.” Well, it was either me or one of two friends. The term did not originate with The O.C. as Urban Dictionary describes.

Well, now the coiner of “redonkulous” has fixed Amazon’s Subscribe & Save program. A series of about four emails, starting with this one I posted a while back, led to me convincing Amazon that their Subscribe and Save program was broken. The propaganda distributed by Amazon with shipments and on their web site very clearly stated that Subscribe and Save items should ship free, no questions asked, no fees, and all of that.

After a few claims by Amazon representatives that their advertising was in fact lying, they finally started singing a different tune. Technology reasons, they said, and they didn’t know when the problems would be fixed nor could they notify me when they had. In the meantime, I was told to order Subscribe and Save items and then contact Amazon for a shipping refund. That wasn’t an option since the convenience was kind of destroyed at that point.

But now you can order Amazon Subscribe and Save items with free shipping, regardless of if the items are over or under $25. You can thank me for uncovering this significant problem in a rather high-profile Amazon program. Or, heck, maybe Amazon could thank me. Yeah, that’d be nice - redonkulously nice.

One year on the lam from the expected

Today is the one-year anniversary of me stepping out on my own. Frankly, it blows my mind that it has already been a year. What a leap I took! I’m nothing but happy with the decision, even if I’m not exactly where I hoped to be at the one-year mark.

I’m proud to say I’ve spent all of my time doing work from the two top items on the list of goals I published last February. Number two on my prioritized work list was “Work on an interesting product for another organization.” In September I was able to do a few weeks of work in helping launch TurfWar, a Minnesota-based fantasy football startup. Unfortunately TurfWar had to close up shop early this football season, but hopefully they’ll be back again in 2008.

A large majority of my work in 2007 was done for Iridesco, a great design studio in New York City. I believe I ran into the Iridesco job posting at rubynow.com. A month passed before I received a response from them. I was impressed with what I knew of their little app that could, Harvest. Iridesco wasn’t looking for someone to work on Harvest, but rather work with their shortlist of clients.

This was a fine way to start out, and I put in a half-time schedule with Iridesco from March to August. We did some Radiant work for Teachers & Writers Collaborative, an excellent literary arts education organization. I’m proud of the time I spent improving and enhaning the AFS Intercultural Programs web site. Iridesco built an expansive content management system for AFS, and we made a lot of great improvements for them in 2007.

In September, Iridesco and I stepped up our relationship with the release of The World Clock Project. I’ll admit, this web site is clearly a feat of design, and not necessarily programming. But I’m happy to have helped deliver the site in around a couple of weeks. Gotta love Ruby on Rails! In any case, if you have some interesting clock photos, please contribute!

I had been patiently waiting for seven months when I began working on Harvest in October. We have an amazing team of four working on Harvest now. It boggles my mind what can be accomplished with such a small group these days. I’ve been involved in some useful enhancements to Harvest, and even some big-time changes. The future is bright for Harvest and Iridesco - I’m thankful to be a part of it.

Above I linked to a long-ago published work-priority list. If you remember, number one on that list was “Work on my own projects.” I must admit that I’ve neglected this goal. Well, I’ve certainly covered one important project - family. In the time before my jump to the corporate world, I was pulling double-duty. While working the 40-hour gig, I was learning, learning, learning to jump. All the while I was neglecting the family a little more than I’d prefer.

The past year has found me reveling in the return of that block of after-hours time. I couldn’t help but feel 45-hours per week were enough. As a freelancer, the amount of time spent on job-like activities always outweighs billable hours by a decent margin. I’ve struggled with fitting personal projects into the schedule, and I’ll admit Scrawlers has suffered from the situation. Scrawlers now has a kick-ass blog to go with a flagging site. I’d like to improve that balance.

I hope to remedy this situation over the next few months, but I make no promises. I still somewhat believe that work spent now on such high-equity projects will eventually pay off in vast swaths of time reclaimed down the road. Yet in these formative kids-at-home-all-day years, it’s kind of hard to justify the lost time. I’ve waited this long and maybe it would be best to get the kids into school before I dip all of my appendages in the water?

So The Next Year of Freelance will see me trying to solve this time-allocation problem. Hopefully I can harness the past year of experience into shorter idea-to-implementation spans, and thus a more varied amount of work. But I’m not going to stress over the situation. It’s a great bind to be in, I think. Onward and upward!

I got your bass guitar right here

Mark King, from the great Level 42, bassin’ it up.

Awake, laptop, awake

I’ve kept you all on the edges of your seats for long enough. After MacBook met water last week, it has been running like a champ since yesterday morning.

SuperDuper! saved my ass and allowed me to work for a week and let the MacBook really, really dry out. Popped the battery in and started ‘er up Saturday morning with no apparent ill effects. I’ll be more comfortable if she’s still humming along in a couple weeks, but I like the chances after having allowed all traces of moisture to get out of the system.

Minnesota represent

I was pleasantly surprised to hear the Oscar announcements this morning and the nominations lavished upon Minnesota-tied No Country for Old Men and Juno. Unfortunately I have yet to see Juno, but I can vouch for No Country for Old Men. What an excellent movie.

Not that I put much credence in the Oscars, but it’s still a nice little recognition for Joel and Ethan Coen and Diablo Cody.

Meanwhile, Apple says “nevermind”

Assuming my main machine comes back to life, I’m not planning on upgrading it to OS X Leopard. Too many headaches for something that’s not broken (again, we’re talking about the OS here!).

One advantage of having an “old” OS X Tiger machine is that it includes Safari 2, rather than the new Safari 3 on Leopard. As a web application developer, it’s nice to have Safari 2 and Safari 3 available to me. Since I have a Mac Mini with Safari 3, it appeared I had the best of both worlds.

Unfortunately, Apple wants me to upgrade my OS X Tiger version to version 10.4.11, which includes a forced install of Safari 3. While I knew this was a long shot, I figured I’d call my newly minted AppleCare line to ask Apple how I can keep my OS X install up-to-date with out bringing in Safari 2. The representative said she knew of no way around Safari 3, but suggested I post to the Apple support forums.

And so I did.

Is there a good way to take the 10.4.11 OS X update without taking Safari 3? I use my MacBook for software development, and would like to keep Safari 2 on this machine for testing. I have a Mac Mini with Leopard for testing on Safari 3.

Any ideas? Did a search but couldn’t find anything pertinent.

TIA!

There were a couple of replies. One seemed too “might-worky” and the other just seemed like too much work with too much opportunity to bork my machine.

Imagine my surprise when I then received this email from Apple.

Your post ” Upgrading to 10.4.11, but keeping Safari 2 ” has been removed from Apple Discussions as it promotes violating copyrights, circumventing DRM, CSS or other encryption.

From the Terms of Use “Do not submit software or descriptions of processes that break or otherwise ‘work around’ digital rights management software or hardware. This includes conversations about ‘ripping’ DVDs or working around FairPlay software used on the iTunes Store.”

Please see the Apple Discussions Terms of Use for more information on the appropriate use of Apple’s Discussion forums. http://discussions.apple.com/help.jspa#terms

Each Discussion user is required to agree to these terms before gaining posting privileges. You reserve the right to not post on Apple Discussions should you disagree with these terms.

Apple Discussions Staff

Nevermind, Apple. Maybe I should just disregard Safari 2 as you apparently have?

SuperDuper! is my savior

Today I exposed several of my shortcomings. I also exposed the excellence of SuperDuper! and Shirt Pocket software.

10 A.M. Minding my own business, coding on Harvest when my bumbling self knocks a half glass of water into my MacBook. “A half glass” is a kind way to say “half of a 32-ounce stadium cup.” You know, those giant cups you get with your $7 soda. The cups that make Super Size Me cups feel inferior. Half of one of those cups - with ice water - into my laptop.

The laptop shut down immediately. I’m hoping that was a detection mechanism and not a sign of failure. In any case, I immediately removed the battery and began the drying process. The laptop will sit untouched until the weekend is gone.

Luckily, I have two nights worth of bootable disk images on an external hard drive, imaged with SuperDuper! I was assured from the Shirt Pocket people that I could boot my new Mac Mini from the MacBook disk images. This amazed me, but I believed them.

Here’s where my stupidity reaches legendary proportions. I’ve had the disk images scheduled and created for at least a couple weeks. The Mac Mini has also been running for a couple weeks. Had I tested the simple process of booting the Mini to the disk images yet? Hell no!

Disaster hit today, and off I go to boot my Mac Mini from my MacBook disk images. Wait a second. In the Startup Disk preference pane, I see no option to boot from my external hard drive. Well, crap on a stick!

Thus began a long and arduous email thread with Dave Nanian of Shirt Pocket software. First, Dave quickly isolated why I was unable to boot from my disk image (I partitioned the drive incorrectly despite my best intentions). Then Dave helped me figure out how to use SuperDuper! to clone the data on my poorly partitioned external hard drive to a second, correctly partitioned external hard drive. This was made even more hairy because SuperDuper! does not yet support the Leopard OS, which my Mac Mini is running. Let’s just say Dave made it happen for me and I’m extremely grateful.

After an hour or two of cloning, the moment of truth arrived. YES! SuperDuper! saved my tail.

If you are a two Mac user on Tiger, you need to get SuperDuper! and get a bootable clone in place.

If you are a two Mac user on Leopard, you may also need to get SuperDuper! I don’t know enough about Time Machine to know if it would have helped you in this situation.

If you are a freelancer or consultant who depends on your MacBook for bread and underpants, I’d strongly advise getting an emergency Mac Mini along with SuperDuper! (or something equivalent) so you can get back to work soon after a failure. I’d also strongly advise testing this process.

Rarely do we get the opportunity to find out if our backup processes work as intended. While my intentions were true, my execution failed. Thanks to Dave Nanian and Super Duper!, the cost of my mistake was drastically reduced.

Technorati Tags: , , ,

Amazon, why have you forsaken me?

Today’s customer support email to a company I actually like.


I am trying to “Subscribe & Save” to several items on your site. I was brought to the “Subscribe & Save” idea through your flyer in a previous order:

  • “FREE SHIPPING on all orders”
  • “All Subscribe & Save orders ship for free. Always.”

So I went to your site looking for things to subscribe to. Seemed convenient! Unfortunately the guaranteed free shipping on all orders is clearly either not working or a lie in advertising. I doubt Amazon would blatantly lie, so I’m wondering what’s wrong?

Basically, if I subscribe to any products under $25, the free shipping is not registering. Example products:

I scoured your FAQ and I have not seen anything specifying that a product must qualify for Super Saving shipping to be shipped free under “Subscribe & Save.” In all of Amazon’s written documentation on the “Subscribe & Save” program, it is very explicit about there being free shipping on all orders and that there are no hidden fees and no penalties.

So, my question is why is the confirmation form saying I will be charged for shipping on “Subscribe & Save” subscriptions under $25?


I first called Amazon. Eventually the CSR tired of me. When I gave him the choice of either (a) Amazon’s system is botched or (b) Amazon is lying in their advertising, he said that Amazon was lying. I actually think its something more subtle. Like perhaps under $25 “Subscribe & Save” orders are free shipping only on shipments following the first one. I could see this being done to keep people from subscribing to get free shipping and then immediately cancelling the subscription.