Sunday, March 20, 2005

The cult of complexity

Just the other day I noticed that someone posted a review on which criticized Liberty BASIC for being a beginner's language. Excuse me? We are talking about BASIC aren't we? Beginner's All purpose Symbolic Instruction Code? Did I miss something?

This reminds me of a software developer I met a few years back at a developer's conference. He asked me about my product, and I gave him a demo. His reaction was "Why would anyone want to use that?" He missed the point entirely. Not everyone has spent the last decade or more of their life developing cutting edge software 40 or more hours a week. If you have to compete with other people, you may well be forced to master the latest and greatest bells and whistles. He forgets that there are scores of people who need to get something done quickly and easily.

Anyone who programmed in BASIC 20+ years ago will agree that Liberty BASIC has more bells and whistles than any BASIC did back then. I'm actually dissatisfied about that. We should be trying to make programming simpler, not more complicated. There is a certain level of sophistication which adds value, but then there is a line which get crossed where things get very murky. Does that new feature make programming simpler, or harder? It can be hard to tell. The more stuff you have to remember, the harder it is to see the forest for the trees.

Aside from getting work done (unless you're programming only for enjoyment), programming is more about becoming smarter and not about proving how smart you are.

Thursday, March 10, 2005

BASIC is Special

Of course BASIC is special!

I don't know how many times I've run into programmers who smugly stick their noses up in the air at the mention of BASIC. I know I've done the same thing when I hear the name Perl. :-p But in fact, pretty much all programming languages are particularly good for one or more kinds of programming tasks. They're all special!

Okay, but what makes BASIC special? Like most programming languages, BASIC can be used to create many kinds of software. But, BASIC is especially great for small games and utilities. If you need to write a tool or if you're playing around, and if you need to get something (anything?)working right now, BASIC is probably just what the doctor ordered. If you've just gotta write that "mega does it all" killer app in BASIC because you love BASIC? Don't let me stop you (especially if you're using my software to do it)! ;)

I know that people who love BASIC often want to make it good for everything. They add this and that until it has all the features of other languages. They mean well, I think. At a certain point this violates the KISS (keep it simple stupid) philosophy that makes BASIC so great at making computers accessible. After all, sledgehammers are great but they sure are heavy. SledgeBASIC anyone?

So let's keep BASIC special. I know I will!

Friday, March 04, 2005

What Defines BASIC?

When you think of BASIC, what comes to mind?

What is the core language itself? I implemented Liberty BASIC from what I considered to be the essentials of the language. I am not a VB programmer. My own experience programming in BASIC comes mostly from these influences:

* Benton Harbor BASIC
* Applesoft BASIC
* Commodore BASIC

Except for Benton Harbor BASIC, these are early flavors of Microsoft BASIC. They all use line numbers and have these commands in common: LET, PRINT, INPUT, GOTO, GOSUB, RETURN, READ, DATA, IF/THEN, FOR/NEXT, DIM, OPEN, CLOSE, etc. There are also functions like VAL, SIN, LOG, LEN, MID$, LEFT$, RIGHT$, STR$, etc.

They are also all command line interpreters. This is an important feature that is mostly lost in modern BASICs. The interactivity of the language is one of the things that makes it approachable and easy to learn. Most newer BASICs are not interactive, including my own. I'm working on a new BASIC which adds interactive features.

So is there a BASIC standard? In fact there is an ANSI standard, developed by a commitee. This standard BASIC is largely ignored by the community of BASIC implementors. Microsoft has been the biggest influencer in the BASIC space, and their QBasic became the defacto standard for BASIC. Visual Basic has not been able to overcome QBasic's popularity for the casual user and hobbiest. Perhaps QBasic's inclusion of an immediate mode (approximating a command line interpreter's interactivity) is one of the reasons why it is Microsoft's last real BASIC?

I'm interested in your feedback on this. My own thoughts are:

* BASIC has a small core of classic commands. Learn these commands and you should be able to be productive in any version of BASIC in five minutes, or it isn't BASIC.
* New commands should be added with reluctance.
* BASIC programmers should not be required to use GUI elements in their programs.
* The BASIC coder should not have to understand C data types to write a program.
* BASIC should be interactive by use of a command line or other innovative features.
* Extensions to any BASIC should not feel like some completely different language so that someone who knows BASIC looks at code written in that dialect and says, "What the HECK is that?!!"

Your thoughts?