The Indiana Jones Programming Method

There's a bug in my outliner.

It's an encoding bug. I write something, save it -- everything's cool. But if I reload the app, thus forcing the file to reload, what I get back isn't what I put in. It shows up when I'm writing complex code that does stuff with string constants. It has to reach a certain level of complexity and use single and double quotes, left angle brackets and equal signs. I have been unable to trap it. Probably because my focus is elsewhere. When it comes to encoding issues, the mind always is elsewhere if you know what I mean.

Anyway, I decided I would work around the problem instead of trying to find and fix it. Even this was problematic. Every approach I came up with fell into the same trap. Until I thought of another approach entirely -- if this editor is screwing with the text, I'll use another one that doesn't have the problem. I saved that file in a folder and now load the code in via a script element in the head of the document. Hey it's a better solution anyway, reusable code! At least I tell myself that. But it works. So there's that.

I call it the Indiana Jones Method, after that famous scene in the first Indiana Jones movie, where Indiana comes face to face with a sword-wielding giant in the bazaar. The giant is twice his size. And he's got a huge sword. And he's good with it. There's a crowd. Foreboding music plays. How the hell will Indiana get out of this one!

I don't want to spoil it in case you haven't seen the movie. But it's clever. He does it much the way I solved this programming problem.

A picture of a slice of cheese cake.


Last built: Wed, Jul 9, 2014 at 11:23 AM

By Dave Winer, Sunday, December 8, 2013 at 5:24 AM. What a long strange trip it's been.