King Rat (gkr) wrote,
King Rat

Sloppy programmers

I just spent the last few hours trying to figure out why, when I added the ShareThis Classic plugin to my web site everything went to hell.

Turns out that the problem is I have Product Previews turned on for my site. It makes fancy pop-ups that show the price of books I'm reading. But it does something sloppy. Everything worked for a while.

ShareThis uses the Prototype javascript library, which makes modifications to the core array datatype. The Amazon code doesn't expect this, even though it should. Everything is malleable in javascript.

I made a passing attempt to hack ShareThis to not use Prototype, but wasn't successful. It doesn't look like ShareThis uses much from Prototype, but Alex King's code is pretty spaghetti, so I haven't been able to unwind where the dependencies are. I ran into a problem with his spaghetti code for another plugin as well. Too damn many wordpress "developers" can't write clean code to save their lives.

  • Last post

    I don't plan to delete my LJ (I paid for permanent status, dammit), but this will be the last post. I don't plan to read it anymore, either…

  • Unemployed

    Turns out my insurance is cut off at midnight tonight, not the end of the month. In a way, that's a good thing. Now I'll move my appointment…

  • Home from the cruise, off to Sunnyvale

    A week off, but tomorrow I head to the home office for a week there.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened