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.


About Dave Winer

Dave Winer, 54, pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software; former contributing editor at Wired Magazine, research fellow at Harvard Law School, entrepreneur, and investor in web media companies. A native New Yorker, he received a Master's in Computer Science from the University of Wisconsin, a Bachelor's in Mathematics from Tulane University and currently lives in Berkeley, California.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s