Monday, January 26, 2009

A First Look at DarkBASIC Professional

I have a student that wants to learn programming using DarkBASIC Professional. Fair enough, I've worked in a fair few BASIC dialects. BASIC is not typically what I start a student with any more, but this is a one-on-one situation. So I'm willing to give this particular commercial BASIC dialect a shot.

I went out to the website for DarkBASIC Pro and poked around. I found several versions of DarkBASIC (standard, pro, Lite, etc.), and as it happens when I went to download a trial version I got a page that simply tells me that the trial version isn't available. No forwarding links or anything.

OK, let's try again. I note that the page I ended up on is for DarkBASIC, not DarkBASIC Pro. Other pages I look at are all asking me for money that I'm not yet prepared to spend. A bit more poking around turns up a better page that allows for a download of DarkBASIC Pro's 30-day trial version.

So I download, scan for viruses (you never know, even some of the best outfits get hit, and as usual for Windows there's no MD5 or other checksum I can use to check file integrity after download) then I install the program from an administrative login. All goes smoothly up to that point.

Afterward, I go back to my usual account, a limited account where I normally do all my programming work. DarkBASIC starts, asks me to activate it, I do so with no fuss or muss and get into the editor. I type in a short program, and hit F5 to compile.

Whereupon I get an error message telling me that DarkBASIC Pro can't write to the directories under C:\Program Files\ where DarkBASIC Pro is installed. No problemo, I'll just let DBPro know that I want to save somewhere to my local user directories. Hmm, or I'll try to.

A perusal of the menus in DBPro didn't turn up any way to do that. Normally I expect to set the options for the user or the project to save to where I tell it to save. The Options pane in DBPro includes no such thing, or any other menu item that I could think to select on the basis of logic or any extension of it.

So DBPro expects me to install as an admin, and do all my programming as an admin, even though it installs a desktop icon for all users? Poor form!

I changed users to my admin account and started DBPro there. It needed to be activated again, so I did so. I entered a program and ran it. It compiled OK, the Trial Version splash screen came up, all OK. Then I get an error message telling me that I only have DirectX 9.0 installed, and that DBPro wants 9.0c. What a load of nonsense!

I had run DXDiag before donloading DBPro and verified that I met the system requirements. My system is running DX9.0c.

Fortunately, after reporting this "error" DBPro went ahead and ran my program anyway. Good thing it did, I was getting pretty annoyed by this point. My program ran fine. It was a simple PRINT program, nothing more. Since DBPro uses a run loop sort of runtime, such programs need a statement at the end to keep the program from "falling through" and ending before the results have been seen. In my case I added a "WAIT KEY" line:

PRINT "Howdy"
WAIT KEY


That's not exactly the program, but it gets the idea across.

I entered, compiled and ran several other simple programs to try out some standard BASIC control structures. They all ran fine, aside from the erroneous error message which was repeated with every run of every program.

So, is DarkBASIC Pro bad? Not at all. But it falls short of its moniker of Professional. I expect to be able to use a professional tool with individual, limited, user accounts with data stored local to that user. To be honest, I also expect something labelled as "professional" to allow the use of a revision control system, and I see no evidence of that in DBPro so far, though it may be hidden in there somewhere.

Whether I'll use DBPro with my student remains to be seen. It'll be adequate for some introductory work at least, though I may see if we can change to Visual BASIC Express, Java, or some other free development package suited for beginners. These also have wider application than DBPro in the world at large. Further, lots of information is available on them for free.

There are some free DBPro resources, but the primary resources from the company that makes DBPro are extra purchases. The printed manual my student had for DBPro that came with his purchase of it was not at all a good reference for a new programmer. The company offers a book for more money, but they keep asking for money here and money there, and it gives a feeling that their legitimate profit motive may be stretched a bit beyond where it legitimately belongs.

Edit:

I have since tried to add some sound commands. DarkBASIC Pro now tells me that I do not have DirectX installed, and my programs don't function at all, even in debug mode. My student was able to compile and run the example applications provided with his purchased copy of DarkBASIC Pro, so I know that such things can work. But that doesn't do me much good. I think I'm going to see if we can shift over to something that I can expect to work the same on both our systems, either Java/Greenfoot or Visual Basic Express.