What’s in a syntax?

February 11 0 Comments Category: General

I’ve recently been working on a project that allows for third-party plug-in development.  I’ve become very interested in plug-in systems (though they’re a pain in the ass to script) because they’re the perfect situation:  it allows for other developers with nifty ideas to improve your product without any work from you.  The laziness is neat, but it also allows for innovation in ways you might not have thought of yourself.

However, in writing up the sample plug-in code, I’ve come to realize that trying to read my syntax may cause anybody with any background in coding or scripting to bleed copiously from the ears.

See, I used to teach English, and I think in complete sentences, even when I code.  In my brain, things make more sense that way.  In fact, back in college I dropped out of logic class twice, not because I couldn’t manage it, but because it drove me completely apeshit to take a statement that made sense and quantify it until it didn’t make sense anymore:

All men are mortal.  Socrates is mortal.  Therefore, all men are Socrates.

Well, now.  That’s just stupid, and anybody with half a brain can tell it’s stupid.  I don’t need a proof, or symbols, or math to tell me it’s completely ridiculous.

At least, that’s how I think.  Logic gets a lot more complex than that, of course, and there are circumstances in which the ability to outline the logic of a particular argument is not only useful, but necessary.  I get that; it was just too hard for me to get through the first couple of weeks without standing up, sticking a pencil in each ear, and shouting “I’m not Socrates!” as I ran out of the room hooting and stripping naked.

My scripting reflects the same desire to think in complete sentences.  I name variables, custom functions, etc. in a way that reads like I’m giving instructions to a very slow person:

if(its_raining) UseAnUmbrella();
else return;

Reading this would probably cause anybody with a proper background to think I’m borderline retarded.  Guess I’ll need to borrow somebody with a decent education in this stuff to help me format it properly so anybody modifying the code won’t think I got off the short bus.

I swear, I’m not nuts.  My brain just works differently; I kind of fell into SL by accident (before that I’d been a teacher, a photographer, a graphic designer, a cobbler…  I’m lying about the last one, but you get the idea), and I learned to script by finding problems and flipping through the wiki until I’d solved them.  I think that background makes me versatile, but quirky.

Write a Comment

Commenter Gravatar