King Rat (gkr) wrote,
King Rat
gkr

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 Amazon.com. 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.
Subscribe

  • 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…

  • The Fighting Lady

    The first image is a screenshot from The Fighting Lady at 6:55. The subject at that moment is the maintenance and operation of the ship's…

  • Operation Hailstorm

    Last summer my aunt requested the military file for my grandfather. It finally came through last month. I scanned all 600+ pages a couple weeks ago…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 2 comments