Sunday, January 13, 2008

Moving Up From Web Design

Sometimes you will see people posting something like, "I've been creating web sites for years using HTML and FrontPage but I'd like to know how I can take the next step. How do I become a web developer?" Usually the answer provided is something like, "You should learn PHP."

Is PHP the answer? The answer is of course, it depends.

If you're just looking for a job skill you can put on your resume, then PHP may be exactly what the doctor ordered. But, if you are building your own sites or are doing custom work for a client, or want build something for use at the office, or if you just want to learn because programming interests you then you really should consider Run BASIC. You can get something going faster with Run BASIC than with more traditional web tools because Run BASIC is designed to be easy. It doesn't try to fit into the mainstream notion of a web tool. There are just too many of those.

Take a look at the site at http://www.runbasic.com/ for more information.

Intel and the OLPC

I was shocked this last week to discover that when Intel left the One Laptop Per Child project, many people immediately used this as an opportunity to say that OLPC is finished, done for, kaput. Why, just because one of their most recently joined partners was ousted? Their other partners include Quanta, Chi Mei, AMD, News Corp, Google, Brightstar, Red Hat, Nortell, Marvell, eBay, SES/Astra, Citigroup, Real Networks, Seagate, Adobe, and more.

Seriously, it seems like people want this project to fail and I'm not sure why. I am a proponent many of the ideas that are intrinsic to the XO laptop and the software it comes with, so I'm rooting for it to be a success. I even participated in their Give One Get One program, and I'm eager waiting for my very own green and white XO laptop.

Some people think that because Intel is also selling laptops to education ministries in poor countries that this dooms OLPC. I hope they're wrong. Intel is selling what amounts to power guzzling Windows laptops. They aren't rugged enough, they need AC power to run, and they run Windows and Microsoft Office. In other words they are only in the market to kill OLPC and they don't care the least little bit about benefitting children.

A lot of other people trash the OLPC because it isn't useful to them personally. This is just a nonsensical position to take. It isn't designed for the affluent consumer but for education starved kids in poor countries out in the bush. It fulfills it's intended role perfectly. It is designed specifically to open a world of learning to kids, and not just give them boring drill and repetition games. Why do American consumers tolerate boring educational software BTW?

The OLPC is a completely open platform with a designed-for-kids collaborative GUI and built in wireless mesh networking, special BitFrost security, and very radical learning software. It is uncompromising in executing the vision it sets forth. Very cool.

Some people criticize OLPC saying that kids don't need computers, but clean water and food. There are already many charities striving to provide those things. Why is it wrong for another charity to enrich their minds?

I encourage everyone to go to http://video.google.com/ and search for OLPC or Negroponte. There are some excellent long presentations that explain all the important ideas of OLPC.

Web 2.0 Podcast Interview - Run BASIC

James Robertson interviewed me yesterday on his weekly podcast Industry Misinterpretations about our new web appserver Run BASIC, where he describes it as a Web 2.0 platform. I don't usually use that term, but I guess if the shoe fits...

The interview lasted more than an hour, and it was a great time. We talked a lot about how complicated programming systems are these days, and how badly we need simplicity to make a comeback. :-)

Listen to part one of the interview here:
http://www.cincomsmalltalk.com/blog/blogView?entry=3377692218

Part two will be posted next week.

Saturday, January 12, 2008

iPhone BASIC?

Now that we've released Run BASIC, we would like to collect some feedback about the idea of adding some capability for the iPhone (and other mobile phones). There is a Javascript library and some CSS called iUi http://code.google.com/p/iui/ which provides the metaphor and visual look for iPhone (and iPod Touch) apps. This would make for very easy iPhone development, and it could be a great marketing button for Run BASIC.

Apple plans to announce some sort of SDK next month if I'm not mistaken, but a lot of iPhone software development will definitely still be web apps.

We could:

  • Work on this now
  • Work on this later
  • Encourage the RB community to integrate iUi by writing BASIC code

Perhaps the last option is the most sensible for now. Feedback is welcome.

Friday, January 11, 2008

Learn Web Programming

What does it mean to learn web programming (or web development) anyways? Most of the time it means that you need to struggle learning a programming language, a web server, and a bunch of frameworks. When I tell people that they can learn web programming with Run BASIC their automatic response (unless they're complete newbies) is, why not learn one of the popular web programming systems? Why learn Run BASIC?

I'll tell you why. Because you don't need a thick book with Run BASIC. Because you don't need to install a whole bunch of stuff. Because you can create a program and put it on the Internet in the blink of an eye with Run BASIC. Because you can think about programming instead of about trying to satisfy all the requirements of Apache+Perl, or PHP, or Ruby, or whatever.

http://www.runbasic.com/

Not web programming

Okay, the title of this post is slightly wrong because Run BASIC is a web programming system. But, it isn't wrong because Run BASIC emphasizes not the webish-ness of programming, but the act of programming in BASIC.

BASIC always was the people's language. It was a success as the first popular way to create programs for home computers. It was so easy that even children learned programming with it. I was one of them.

So, this is the age of the Internet. Run BASIC is the BASIC of the age of the Internet.

Come and join our online forum and see what people are saying: http://runbasic.proboards82.com

Sunday, January 06, 2008

Run BASIC's Programming Model

Most web app systems model applications as a collection of pages. Information must be persisted between pages in some sort of datastore. Sometimes this is in memory but oftentimes it is done in a database or by passing files. Run BASIC does not force you to partition your applications in this way. Instead you can write your entire application as a single continuous program just like you would write a desktop app. You create a new page in your application by clearing the page and placing new things onto it in a dynamic way.

Traditionalist procedural programmers can create entire applications using subroutines and functions, similar to how it is done in popular languages like QBasic. This democratizes web programming because many casual programmers are comfortable with this way of coding software.

More object-oriented thinkers can componentize their systems into objects and call methods on them. The objects can be purely data, or they can render into a display buffer and be injected into a web page. This makes it easy to have different parts of a web page managed in a modular way.

http://www.runbasic.com

Saturday, January 05, 2008

Run BASIC v1.0 is released!

Well I've been awfully quiet here for a couple of months, but for good reason. Everything we've been doing has been leading up to the release of our Run BASIC Personal Server, and now it's finally available. To pick up a copy head on over to http://www.runbasic.com !!

We've also launched a Run BASIC forum so come on over to http://runbasic.proboards82.com and see what's going on.

Tuesday, October 23, 2007

Thursday, October 11, 2007

Half Life 2 Episode 2

I've been a big fan of Half Life and its sequels for years, and Valve just released HL2 Episode 2 so I've looked at some reviews online. It's receiving very high marks by those who've played it.

So why am I posting about a video game here? Because I'm dying to play it, but I won't play because I can't allow myself to be distracted from working on Run BASIC right now. Probably I'll give myself permission to enjoy some game playing abandon when the holidays roll around.

In the meantime Run BASIC development is a lot of fun too in many important ways. :-)

Thursday, September 27, 2007

Parsing XML in Run BASIC

One of the important feature that a Web 2.0 language needs is an XML parser. Run BASIC now has one built in. The XMLPARSER statement parses an XML string and returns an XML accessor object with a bunch of handy built-in methods for making your way through an XML document.
Here is a simple example of what that sort of code looks like:

a$ = "<program name=""myprog"" author=""Carl Gundel""/>"
xmlparser #parser, a$
print #parser key$()
for x = 1 to #parser attribCount()
key$ = #parser attribKey$(x)
print key$; ", ";
print #parser attribValue$(x)
next x

This short program produces:

program
name, myprog
author, Carl Gundel

And here is a short program which will display the tag names and contents of an artibrarily nested XML document:

xmlparser #doc, s$
print #doc key$()
call displayElements #doc
end

sub displayElements #xmlDoc
count = #xmlDoc elementCount()
for x = 1 to count
#elem = #xmlDoc #element(x)
print "Key: "; #elem key$();
value$ = #elem value$()
if value$ <> "" then
print " Value: "; value$
end if
print
call displayElements #elem
next x
end sub


Monday, September 24, 2007

Do-it-yourself programming

A friend of mine pointed me at this article "Do-It-Yourself Software" in the Wall Street Journal.

http://online.wsj.com/public/article/SB119023041951932741.html

Run BASIC and Liberty BASIC are both aimed at this market, and in fact this is the traditional niche of BASIC language products.

More on modularity

Run BASIC gives you the ability to create web pages that are component based. You define your own components and the ease at which you can plug these things together comes essentially for free. Here is a really simple example that I posted in our beta testing forum:

[masterPage]
cls
html "Program manager"
link #wiki, "Wiki", [runTheWiki]
print " ";
link #multi, "Multicounter", [runTheMulticounter]
print
if launchFlag then render #subProg
wait

[runTheWiki]
run "runWiki", #subProg
launchFlag = 1
goto [masterPage]

[runTheMulticounter]
run "multicounter", #subProg
launchFlag = 1
goto [masterPage]

Here is a version that doesn't use any GOTOs:

global launchFlag
call displayMasterPage
wait

sub displayMasterPage
cls
html "Program manager"
link #wiki, "Wiki", runSubprogram
#wiki setkey("runWiki")
print " ";
link #multi, "Multicounter", runSubprogram
#multi setkey("multicounter")
print
if launchFlag then render #subProg
end sub

sub runSubprogram linkKey$
run linkKey$, #subProg
launchFlag = 1
call displayMasterPage
end sub

So what does this do? It creates a simple web page with a title and two links. Click on the wiki link and the wiki program becomes part of the web page. Click on the multicounter link and the multicounter replaces the wiki part of the page. You can switch back and forth between the wiki and the multicounter at will with just the click of a mouse. What's even more interesting is that the multicounter is already a modular program, so you get three levels of modularity but you aren't limited to that.

So for programmers who like to put all their code in one file, there's nothing to prevent that. But people who like modules can have a field day.

Tuesday, September 11, 2007

Run BASIC enters beta testing

Well, it's been quiet here for a couple of months but now that the summer activities are over things have begun to pick up steam. In particular we started beta testing Run BASIC Personal Server a few weeks ago. We are still looking for a few more people to help test.

Run BASIC Personal Server is an all in one web app server, BASIC scripting language, database engine and more. It offers an extremely easy way to get into web application development. When I say extremely easy I am not exaggerating. We are talking "a child could do it" easy web programming.

When I asked my testers how they would describe Run BASIC, here is what some of them said:

" - - Run BASIC provides a complete alternative to the complex development languages that have evolved to script web content. Run BASIC wrests control back to you, allowing BASIC language scripting of web content. Create web pages in an easy to use project development environment and publish on the web at the click of a mouse."

" - - If you've ever used one of the classic BASIC interpreters, then you already know most of what you need to build dynamic websites using Run Basic."

" - - Run BASIC moves desktop programming out onto the internet. The screen displays, forms, interactions, graphics, and data-handling processes you create with clear, understandable BASIC programs suddenly become web applications, usable by anyone, on any platform -- Windows, Mac, Linux -- on any computer with browser access to the internet. With Run BASIC, you can write your program from anywhere, on any computer, and run it everywhere, on every computer."

If you are interested in Run BASIC and feel you have enough time to spend at least a few hours testing it out, please send an email to me at carlg@libertybasic.com and explain why you would like to be a beta tester.

We will accept only a certain number of applicants and I'll post a note here when we have enough.

Thanks!

-Carl Gundel

Saturday, July 07, 2007

Database and web capabilities

Our Run BASIC + SQLite integration is coming along nicely, and it lays the groundwork for using other databases later on (Oracle, SQL Server, MySql, etc.). One thing that we did to make using databases handy is that we built in some display technologies. You can query the database and then just use the RENDER statement to put the result on the web page. You can also inject some CSS styling right into that result, and you can even turn the line items of any column in the displayed table into links.

We also have added an httpget$() function so you can use HTTP to retrieve web documents like web pages, RSS feeds, etc. We plan to include an XML parser, and if we can come up with an easy to use way to stream through an HTML document we will provide that also.

These capabilities (except for the table rendering) will also be included in Liberty BASIC v5.0.

To keep up with what we're doing with Run BASIC, make sure to visit this blog and also http://libertybasic.conforums.com/index.cgi?board=runbasic

Wednesday, June 27, 2007

Adding SQLite to Run BASIC

Here is some example code that runs under Run BASIC using SQLite v3.4. I haven't pushed this stuff onto the publicly hosted site. SQLite will come with the Run BASIC personal server and should be suitable for many projects. Support for other databases like Oracle, PostgreSQL, SQL Server, etc. will be added with the professional server license.

sqliteconnect #users, "test.db"
call execAndPrint "select * from users"
call execAndPrint "select count(*) from users"
#users disconnect()
end

sub execAndPrint query$
#users execute(query$)

while #users hasanswer()
result$ = #users nextrow$(",")
print result$
wend
end sub

SQLite is a popular database engine provided as a library and is supported for Windows, Mac and Linux. The source code is available and is in the public domain so it is completely free. We will support the parts of Run BASIC that integrate with SQLite, but as for the specific level of conformance to the SQL standard and other technical details, see http://www.sqlite.org/

The SQLITECONNECT #obj, "databasefile.db" statement connects to a database and sets the #obj variable to be a connection object. The connection object understands EXECUTE(), HASANSWER(), NEXTROW$() and DISCONNECT(). I'm sure there will be more commands.

Notice the NEXTROW$() method. It returns each query result row as a string, with each item delimited by the specified string ("," in the example but it could be CHR$(9) or something else). It is trivial then to use the WORD$() function to extract the information. We will certainly also add the ability to get items by name.

Wednesday, June 20, 2007

Run BASIC and the iPhone

With Apple's iPhone getting ready to ship at the end of this month I'm very excited that we will have something soon that iPhone owners can use to customize their devices by running their own programs in the iPhone's built-in Safari web browser. Run BASIC (http://www.runbasic.com/) will be one easy way to extend the new device in the same way that many people used to use BASIC to create their own applications and games. This is really just the beginning since you can be sure that there will be so many similar kinds of telephones produced by the major cell phone makers.

I have a Treo 650 myself, and I can use it to access the Run BASIC site, but it is awkward because the web browser it includes is slow and the Treo has a tiny little screen. I am eager to see how this all works on the iPhone, and if it is compelling I may even buy one just so I can demonstrate Run BASIC wherever I am. ;-)

Thursday, June 14, 2007

Support for CSS class tags

In an earlier post I described how Run BASIC can use the DIV and CSS statements to style a web page. That works well for styling the different parts of a web page, but not for styling individual things on a page.

One new addition to Run BASIC is the ability to add a CSS class tag to an object on a web page, so that it can be manipulated.

For example the following would create a link and set a class to "button".

link #doMyBidding, "GO", [go]
#doMyBidding cssclass("button")

And the following statement would add the CSS needed to style the link (or any object that has the class tag "button"):

cssclass ".button", "{ put some css styling in here }"

Here is a link to a video demonstrating how this all works.

http://www.youtube.com/watch?v=1qomg67VdF0

Sunday, June 03, 2007

Component Based Web Development

As a followup to the modules post I made a few days ago which is applicable to both Liberty BASIC and Run BASIC, Scott and I have created something very web specific for Run BASIC.

In addition to inserting graphics into a web page, Run BASIC's RENDER statement can now be used to insert a module into a web page. We have this in a rough state now. It does work, but we need to iron out a couple of things.

What is this useful for? You can now create different parts of your web application as separate programs. You load them in and render them into the page. You can also control them using their own functions.

For example you might have a blog application with different parts of the page rendered by their own modules:
  • BannerLogin
  • Navigation bar
  • Entries
  • Archive outline
  • etc.
Each component has it's own little virtual page which you can print to, embed graphics into, cls, add links and other stuff to, etc. The contents of the component are managed automatically. Only a RENDER statement is needed.

By using the DIV and CSS statements, the modules can be formatted on the web page in an attractive and useful way.

Saturday, June 02, 2007

Rumblings under the surface

I apologize for the slow progress of things lately. It only appears on the surface that progress is lacking. We've been busy doing very cool things that we plan to reveal soon. Thanks for your patience.

Wednesday, May 30, 2007

Modules and Run/Liberty BASIC

People have been asking for a way to create code libraries in Liberty BASIC for some time. I have thinking about how to do this using an in-memory model. Over the weekend Scott and I worked on adding some modularity to the Run/Liberty BASIC language. Here's how it works so far. We are open to suggestions.

The RUN statement has a new form. If I want to use mymodule.bas as a module in a program I am writing I would code it like this:

run "mymodule.bas", #myModule

This causes mymodule.bas to be compiled into memory. It will execute code up to the first wait statement. This is how values will be initialized. The program then becomes an object assigned to the #myModule handle.

Then you can call any function on that program from within the calling program, like so:

#myModule myFunction(myParameter)

or even use the invokation in a more complex expression:

print "digits: "; len(#myModule myFunction(myParameter))

You may recognize this syntax as being the same as for controlling widgets. It relies on the same underlying mechanisms to do its work.

When we're done with this, modular programs loaded this way will be cached in memory and will only recompile when the source file changes.

Monday, May 21, 2007

Inkey$ and Liberty BASIC

There has been some discussion in the support forum about extending keyboard handling in Liberty BASIC programs. Currently we only allow doing something like this in the graphics views. Two things (maybe more?) are missing:
  • Getting the next character in the mainwindow without stopping the program. Currently only INPUT and INPUT$() are supported. Both stop the program and wait.
  • Getting the next character typed for some window or widget that has focus. In other words, reading keypresses for objects with handles (ie. #thisWindow)

What I suggested in the forum is a function called inkey$().

The following would read keypresses for the mainwindow:

print inkey$()

or it could be abbreviated to:

print inkey$

To read keypresses for windows or widgets with handles:

print inkey$(#handle)

I'd like to solicit feedback here. Any ideas? Please leave a comment, and thanks!

Thursday, May 10, 2007

BASIC and CSS

One of the important aspects of integrating a programming language with web development is page layout. Until recently this would have meant inserting lots of HTML tags into your source code. You can do this with Run BASIC.

However there is a better way. It is called CSS (Cascading Style Sheets). This provides a way to wrap the things on your web page with tags that you give your own names to, and you defined the appearance of the stuff wrapped in those tags somewhere else. This way your program's code has very little extra stuff in it to clutter up your code. If there is too much clutter it can be very hard to understand what code means, and this can slow you down and lead to bugs.

So, Scott McLaughlin and I have begun to integrate CSS with Run BASIC. We added a CSSID statement (originally this blog entry had this as CSS, but we changed the command), a DIV statement, and an END DIV statement. Here's a very short example:

cssid #myTag, "{ background: #FFDDDD; font-family: tahoma }"

div myTag
print "count to ten"
for x = 1 to 10
print x
next x
end div

Okay, so this displays all the text printed between the DIV and the END DIV with a light red background, and using the tahoma font. The #myFont token isn't a handle like the ones used for files and GUI controls. The # is simply part of CSS syntax.

DIV statements can be nested, and the contents of one DIV block will be rendered on the page nested inside of each other.

There is a lot more that can be done with CSS, and we're trying to explore what are the simplest and most useful things to include in Run BASIC.

We will be posting a screencast in the next few days that shows how this works.

Friday, May 04, 2007

Demo of Run BASIC at Smalltalk Solutions

Wednesday evening I had the priviledge of organizing the Seaside BOF (birds of a feather) session at Smalltalk Solutions. This meant that I was the one up at the microphone (which I pushed aside since the room wasn't big) for most of an hour and a half. It was fun and I didn't feel put on the spot since this was more of a round table than anything. I only had to try and direct the conversation some.

Here is James Robertson's blog entry with a photo of me presenting.

http://www.cincomsmalltalk.com/blog/blogView?entry=3355631481

I'm very small in the frame, but yeah that's me all right. You can make out the Run BASIC web page up on the screen if you look carefully.

The demo was a little bit scary since I was modifying the Run BASIC code almost right up to the last second before the meeting. Scott and I were spending most of our free time at the conference working on some simple CSS integration. I'm hoping to put a screencast up to show how it all works.

Thursday, April 26, 2007

Artificial Intelligence and BASIC

When I was 13 or so years old I bought a book at You-Do-It Electronics titled Experiments in Artificial Intelligence for Small Computers, authored by John Krutch. This book influenced me in important ways. It teaches the essentials of AI so anyone could understand it. Examples are presented in the BASIC programming language. One of the examples presented is of the classic Eliza sort of conversational system. Not cutting edge research, but as a starter it gets the job done.

I was able to use the techniques in the book to create demos for the computers at NEECO. A person visiting the store would ask the computer about itself, and the computer would try and respond appropriately with a demonstration of features.

The book can still be purchased used on Amazon.

Wednesday, April 25, 2007

Missing the Point

I read a paper the other day that described a system for teaching kids programming. It was one of those robot simulations where the student learns programming by using a special mini-language to teach an on-screen robot to accomplish certain goals.

So in this case the language in question is a simple one, specialized for the robot ideas as a gentle way to introduce programming.

Later in the same paper they described how a newer version of the system switched to Java as the language for the robot. I am amazed how easily people are brainwashed into using the popular thing in place of the right thing. Instead of something simple use the "industry standard" language, no matter how much it might damage their minds. :-/

What would be better? I guess the robot language they were using before would be just fine. Or pick some other simple language if you're looking for mindshare. BASIC, LOGO, Forth, Smalltalk.

Tuesday, April 17, 2007

BASIC Contributed to Success of Industry

It seems to me that BASIC was one of the reasons for the success of the early microcomputer business. I get so many emails from people who:
  • bought a computer twenty or thirty years ago
  • learned BASIC and did fun and productive things
  • migrated to Microsoft Windows when it became the defacto standard OS
  • found Windows programming languages to be too hard
  • stopped programming for a LONG time
  • stumbled across Liberty BASIC http://www.libertybasic.com
  • started programming again in earnest!

The remarkable thing to me is that Liberty BASIC isn't as simple as the original BASIC interpreters were, but it is still so much easier than VB or Java that it serves as an acceptable gateway back into computing for so many people.

Saturday, April 14, 2007

BASIC versus RoR?

Someone posed the question recently about how Run BASIC http://www.runbasic.com will stack up against Ruby on Rails. I think the question was meant primarily about performance. This is really an apples to oranges comparison because Run BASIC isn't meant to be a scripting language.

While I don't doubt that some people will use Run BASIC to create commercial sites, this is not the focus we are pursuing. Instead we are creating a tool for the traditional users of BASIC. If you want to learn or teach programming, if you want to create web apps for your use at home (or on your iPhone!), or if you need a custom application at the office and the IT folks and programmers are too busy to build it for you then Run BASIC is designed for you. :-)

Coming back to performance, the processing of large web applications is bottlenecked at the database. A Run BASIC front end to a database will perform similarly to other languages like Perl, Ruby, etc.

Saturday, March 17, 2007

Run BASIC Personal IDE sneak peek

Here is a link to a screencast showing how Run BASIC can be used to create a blogging application with very little code. Enjoy!

http://www.libertybasic.com/basicology.html

Friday, March 09, 2007

A Small Matter

I'm a big fan of object oriented programming a la Smalltalk. Nothing could be more different from BASIC than Smalltalk.

How do I resolve my love for BASIC and Smalltalk? It's easy. I pick the right tool for the job.

For large projects Smalltalk rules. Anything that has to scale to support many specialized features scales better when constructed from objects (usually anyways).

BASIC's strengths become evident when you know that your project will always be small. In such cases I can knock out a quick solution to my problems faster in BASIC than I ever could in Smalltalk, or Java for that matter.

In addition in order to be productive in most modern systems like Smalltalk, Java, etc. I need to learn to use a large class library. In BASIC I can dispense with all that.

BASIC is fun.

Monday, February 12, 2007

BASIC and Web 2.0

Run BASIC has been called a Web 2.0 BASIC by several people now. I have been pretty much avoiding that classification (lately) because I don't think it meets that description, yet.

One idea that is important for Run BASIC to be a Web 2.0 system is that it needs to be able to consume information from other internet sources. The ability for the user to write a program that downloads the contents of a web page and then process that as information, or the ability to read RSS feeds as data would get us partway there.

I'd be interested in the reader's thoughts about this (yes, you!).

Sunday, February 04, 2007

Run BASIC Two Weeks Report

Well, Run BASIC (http://www.runbasic.com) has been online now for slightly more than 2 weeks. We've had more than 1500 unique visitors.

There have been a handful of server crashes in that period and numerous bugfixes. A few of these fixes are related to stability of the server but most are new features or fixes in the compiler or runtime system. This is a very good thing since most of this stuff feeds directly into the Liberty BASIC v5.0 effort. In essence this is a kind of alpha testing for LB5.

The community has responded nicely by creating a Run BASIC section on the Liberty BASIC Conforums site and by putting up a wiki. People have been busy creating programs that run under Run BASIC. Thanks to all of you for that.

Where are we headed with this? We have just started work on a Run BASIC personal edition. This will be a special version of the software that you can install on your own computer. Windows, Mac and Linux will all be supported. The user interface for this will still be web based, but it will be more of an IDE style setup. Our idea is that you can use this system to host a web site and share programs that you write as links on a home page. We are thinking a license for this system will cost $20 to $30.

Once the personal system is launched, we plan to create an educational system for instructors. Each student can have an account, and they can work through their lessons in their browsers whether at home, at school, or wherever they can access the server by means of the internet. Access to student work will be managed for the instructor automatically. We'll develop these ideas more later on.

Tuesday, January 23, 2007

New web BASIC launched!

The new Run BASIC site is now up! This site is a starting point for new web technologies that use Liberty BASIC is the core language. The site is a modest (but very cool) demo of what's to come. If you have always enjoyed programming in BASIC we think you'll like Run BASIC. Check it out! http://www.runbasic.com

-Carl Gundel and Scott McLaughlin

Friday, January 12, 2007

Tiny BASIC Revisited

Scott and I decided to port Tiny BASIC over to Liberty BASIC last week. What we have is mostly working now and I'll make it available after I've polished it a little more.

In the Wikipedia article I mentioned before there are two versions of Tiny BASIC implemented in BASIC. The one we decided to use is here: http://www.aldweb.com/articles.php?lng=en&pg=7407 We decided to use this one because it is simpler. It is also open source.

So what we have is a cute little line numbered BASIC interpreter. In fact the version of BASIC used in the original TRS-80 Model I computer was Tiny BASIC. So if you've ever used this machine or anything like it (VIC-20, C64, Atari 400/800, Sinclair ZX81, etc.) you remember entering code a line at a time each with a line number, typing LIST and RUN. You also have immediate evaluation, which is a nice feature that most languages (even BASIC) don't have today.

The limitations? Single letter variable names. No string variables at all. Only about 100 lines of code per program (a completely artifical limit left to the reader to remove). No GOSUB/RETURN.

Okay, so why do this at all? Clearly this is not a useful programming language, right? I'm not so sure.

First, as an example of how to create a simple programming language it is great. The code is pretty well written (even though it looks like it is also written in a version of Tiny BASIC) and I had no trouble following it.

Then, when I consider just how small this program is I am impressed. In very little code the author has created an interactive programming environment.

If someone wants to use this as a platform to experiment it is wide open. One could try extending the language with string variables, add graphics support, or build a programmable robot battle game on top of it. Perhaps it could even be used to support scripting for Liberty BASIC applications.

Very cool. :-)

Thursday, January 11, 2007

BASIC and iPhone

Well, my post the other day about the iPhone wasn't about BASIC programming, but now that I've had a chance to think about it this new device does have some implications. One interesting thing about iPhone's introduction is that nothing was mentioned about development tools. This is a little bit of a contradiction since the iPhone runs Apple's OS X, a full blown Unix operating system. Since this new device is more computer than phone you would expect there to be some way to at least customize it by installing software, or perhaps by scripting. This would also make it easier to justify spending $500. On the other hand you must be a Cingular customer. Hmmm. :-/

It would be great if Apple decides to support this. Imagine Liberty BASIC on the iPhone! If software installation isn't a feature of the iPhone at least you will be able to run our web BASIC on it using the Safari web browser since you'll have an always-on internet connection. :-)

Tuesday, January 09, 2007

New Apple Phone

I admit this has nothing to do with BASIC, but go to http://www.apple.com and see what their new iPhone looks like. I'd be tempted to think this whole thing is an April fool's joke, but it's only January.

Friday, January 05, 2007

A sneak peek at our web BASIC

Alyce Watson asked if she could post about the sneak peek we gave to her of our server in action. Have a look at what she had to say.

http://libertybasic.conforums.com/index.cgi?board=lb5&action=display&num=1168003459

We plan to unveil this web BASIC as a free site this month. Later we will sell personal licenses perhaps an affordable subscription service. After that, who knows? ;-)

Tuesday, December 05, 2006

My BASIC? Your BASIC? Tiny BASIC?

Not infrequently people will post questions in our community forums (http://libertybasic.conforums.com and http://groups.yahoo.com/group/libertybasic) asking how to implement a programming language. Usually someone will chime in with a link to some very detailed tutorials hundreds of pages long. This is fine if the reader is sufficiently well motivated.

The other day I stumbled on a very cool page on Wikipedia about Tiny BASIC, a language implemented many years ago and published in the seminal Dr. Dobbs Journal magazine. I realized that budding language implementors would really go bonkers for this!

http://en.wikipedia.org/wiki/Tiny_Basic

Check out the links at the bottom. There are a couple of implementations there written in BASIC with source code. What better way to get your feet wet but to port Tiny BASIC to Liberty BASIC or to your favorite BASIC? Doing the port shouldn't be too hard, and you'll learn enough to venture adding some new commands. :-)

Wednesday, October 25, 2006

C for Beginners?

I recently responded to someone's blog comment that said that BASIC is not a good language for beginning programmers. He suggested instead that beginners learn C. I responded that C is a fine language for many purposes (like operating system development), but that it contains too many difficulties that are not fundamentally related to learning programming. Here's a cool page that I found using StumbleUpon http://www.stumbleupon.com that illustrates my point effectively. ;-)

http://www.andromeda.com/people/ddyer/topten.html

BASIC's culture of diversity

One of the really interesting things about BASIC is that there are probably more dialects than any other programming language. Perhaps this is because BASIC really is the people's language. Sure, there are different versions of C (a few), Cobol (why?), Forth, etc. but people just love to create their own version of BASIC for whatever reason.

I guess that since BASIC was born into a world where it was shoehorned into many, many different computers it became part of the BASIC culture that it is okay to have many broadly different implementations. Every early home computer had it's own BASIC.

Now I've heard it said that this is a weakness of BASIC, and many people complain that there is no commercially viable standard BASIC. I'm not sure why this is a problem. The standard (by committee) is very old and limited. Since the world is constantly changing, I think it's a good thing that BASIC hasn't settled down into a rut. BASIC is still a place where people feel free to explore and innovate.

The world is big enough to accomodate variety.

Friday, October 13, 2006

Liberty BASIC gets some attention

Although Liberty BASIC isn't mentioned by name, the Liberty BASIC site gets a mention and a link by Jim Kelly here:

thenxtstep.blogspot.com/2006/10/learning-basic.html

Right away some debate about the suitability of BASIC arose in the reader comments. My how things never change. ;-)

Thursday, October 12, 2006

Telengard and learning to program

Many years ago a close friend and I loved to play Telengard on his Commodore 64. This was a classic Dungeons and Dragons styled game. It was very well done and lots of fun. It seems to me though that was most fun about it was that it was written in BASIC. With very little effort we managed to break into the running game and customize it.

In fact recently I mentioned the game to him. He seemed to enjoy remembering most that we were able to hack the game. I was an experienced BASIC programmer at that time and it didn't impress me as much. I simply enjoyed playing the game.

I think what this makes clear to me is that programming novices like my friend really enjoy the process of learning by monkeying with a running system. You can just break into a program, examine or change a variable, add/change code and resume execution. I wonder how many beginners do not go on to become competent programmers without access to this kind of interactive system.

This is something that interpreted BASIC is excellent at. More systems need to be like this.

Thursday, September 14, 2006

It's about computer literacy

David Brin wrote an article about how computer users (kids in particular) need an easy language like BASIC again, and it should come with the computer. Read it all here http://www.salon.com/tech/feature/2006/09/14/basic/index.html

I absolutely agree with Mr. Brin's stance. The trouble isn't that there aren't tons of programming languages to choose from, many of them free. The problem is that the computer doesn't come with an easy language. And if it did come out of the box (like DOS had QBasic), it really should be an icon on the desktop. Hiding it away would be a bad thing.

Also the programming culture worships complexity. What the professional programmer today considers easy sets a bar way too high for the child or casually interested adult. The result is that the fun is removed from the experience. No fun = no learning.

Schools today think that computer literacy is about using Photoshop, Microsoft Office and Frontpage. That's a low-minded place to be. Teach kids to program. Some of them will latch onto the experience.

Security?

Scriptman responded to my last post with the following questions:

O.K. point taken, but how do you overcome security issues such as passing "nasty" commands to the interpreter? (yes even Perl has them if scripts are not properly configured.)

This is a very good question. Our web BASIC uses a custom web server with the language engine built right into it. We are trying to be very security minded. We will sandbox each session to prevent improper access to files and to avoid server swamping, processes that fail to terminate, etc.

Another question I have is, will your Basic have a feature to "get" (sorry no pun intended) parameters such as the IP of the client ?Much like the Perl $ENV{REMOTE_ADDR}

We don't have this yet, but I see no reason why it cannot be made available.

Not about Perl. Not about cgi.

Scriptman replied to an earlier post about our web BASIC effort:

What's wrong with PHP and PERL? They are both free and easy to learn.

So I replied to him with the following:

Perl is a useful tool, but let me explain why this is different from what we're doing.

First of all this is about BASIC, not Perl. If you like Perl then that's great. Use it. Enjoy. ;-)

A lot of people know and like BASIC, which is a perfectly useful language. There's no reason why a nice BASIC for the web shouldn't exist.

With Perl you have to manage at least three components. Your web server, your cgi scripts (you write them using a text editor), and to use your programs you use a web browser.What we're doing will allow the BASIC programmer to do everything in the browser. There is no concept of a remote procedure. An application with sophisticated interactive features can exist in one file, written in a very standard desktop app coding style. In other words this is going to be easy. If you think cgi programming with Perl is easy, this is going to be even easier.

Read the original post and comments here:

http://basicprogramming.blogspot.com/2006/05/web-20-extremely-easy-web-programming.html#comments

Tuesday, June 20, 2006

Liberty BASIC v5.0 for Linux Screenshots

Well, I promised to post some screenshots of Liberty BASIC v5.0 running on Linux, so here they are. Keep in mind that these are pre-alpha shots. Visit this link and click on the topic "Linux Screenshots"

http://libertybasic.conforums.com/index.cgi?board=lb5

-Carl

Saturday, June 10, 2006

LB5 update

I know a lot of people are eager to know how Liberty BASIC v5.0 is coming along.

First of all, please don't hold off purchasing Liberty BASIC because you think LB5 is about to be released. It won't be available until the end of 2006. Please go ahead and purchase LB v4.03. The upgrade to v5.0 will only be about $20.

Okay, so now some details. I am trying to wrap up an alpha release for testing by invitation only. The alpha will be Windows and maybe Linux. I'd like to release a Mac alpha also, but I'm having some issues that I'm seeking support for. Later this summer we will have beta versions which anyone can test, and these will probably all be Windows, Mac and Linux from the start.

A lot of energy has been going into the core language including user types, support for the new syntax for GUI controls, and graphics drawing.

In a few days I'll post some screenshots of how things are coming along for the general public, including an image demonstrating a grid control and the current (rough) state of the debugger.

I'm also going to blog soon about the new web BASIC Scott and I are working on. It is coming along nicely.

Thursday, May 25, 2006

Programming should be easy

The BASIC programming language was the original easy to use language. This was no accident. The inventors of BASIC designed it to be easy. People from all walks of like created their own software in BASIC on small computers that plugged into their television sets. I was one of those people, and many of you visiting this site remember what that was like. These computers were called home computers. They were simple and could be completely understood by someone without formal training. Anyone could learn to make the computer do what they wanted, and it was a lot of fun!

BASIC was at the center of all this.

However, once the IBM Personal Computer (the IBM PC) made its debut, the home computer began to fade. Every company wanted to make PCs, and home computers began to disappear from stores. With every year, creating software for PCs (which are really business computers) became more and more complicated.

Most home computers came with BASIC built right in. Just turn one on and it says something like:

**UltraBASIC v2.23 - 28374 bytes free**

READY>

Then you just jumped right in and started to program your computer in BASIC because BASIC was the startup mode of the computer. It was easy, everyone did it, and an entire industry grew up from it. This was real computer literacy, not just knowing how to use a word processor or play games and music. People wrote their own games and word processors. Much of the time this was out of necessity, but many people discovered they loved doing it!

Today we have a completely different picture. Programming languages are complicated. The software culture worships complexity and the popular programming languages of the day require thick manuals. Lots of money is made selling training. Programming it seems, is not for the rest of us.

Monday, May 15, 2006

Short term plans for the web BASIC

Scott and I had a sitdown design time last Friday and also managed to get started on some code for the web BASIC he is working on. The idea here is that you will be able to visit a site with a tabbed interface. The first few tabs will each have a code pane with an example program, and a Run button. Click on the button, and the program will run underneath on the same page. This should be a good way to get a feel for what kind of programming is possible. An additional tab will have an empty code pane so that you can try writing your own.

We will support the INPUT statement, so you can create interactive programs. The standard style of BASIC will be supported in this way. We will also include the ability to draw graphics and embed them into the output so you can draw graphs or game boards, etc. Fast animation won't really be possible using an http style of interaction, but if you want to create games that draw images (Star Trek, or Mastermind, or Sudoku) it should be fine.

Programs will be cached on the server for a few hours (or a day perhaps) so if you create a program on the site that you really like, you can share it with a friend by pushing a button to send an email with a URL that will take him straight to the program in his web browser. I think that's pretty cool because there's no need to install any software. It should work in any popular web browser including most phone browsers.

Scott already has some of this working. This should be fun. :-)

Sunday, May 07, 2006

Web 2.0 - Extremely easy web programming

While I am busy working on Liberty BASIC v5.0, my development partner Scott is working on something fun on the side. We are working on a dynamic web front end to Liberty BASIC so that you can write web programs in LB. We have some ideas for a unique tool for web programming that doesn't require all the crazy bits and pieces that are needed for the mainstream web solutions.

This will be an all-in-one solution with its own web server and it can be hosted behind Apache if so desired. We hope that in a month or so we will have a neat demo site up with some example pages that show how it works.

So, there's lots going on! :-)

Saturday, April 29, 2006

Maybe not about BASIC Programming, but cool!

I heard a radio news story the other day which I thought was really significant. A researcher working with the Jet Propulsion Laboratory was interviewed about a new methanol fuel cell that can be used to produce electricity (like a hydrogen fuel cell). The special thing about this new cell is that it can also be run in reverse to produce methanol from carbon dioxide. This means that industrial plants that produce lots of carbon dioxide can use this technology to scrub their output clean of carbon dioxide and also have methanol to sell in a methanol based economy.

This is significant beyond it's greenhouse gas reducing properties. Methanol can be transported and stored much more safely than hydrogen, can be mixed with gasoline, and burns cleanly. What's especially cool about it is that methanol is useful for more than just a fuel. It can easily be used to make all kinds of other useful things like ethanol, plastics, etc. You can't easily make anything useful out of gasoline or hydrogen (or ethanol).

Anyways, it's a really cool story. Check it out at:

http://www.npr.org/templates/story/story.php?storyId=5369301

Now back to our regular programming (pun intended).

Tuesday, April 18, 2006

Object Orientation and LB5

In a recent thread in the Conforums (http://libertybasic.conforums.com) someone asked the question of whether QBasic style types would be supported, and I elaborated and posted an example of what I was thinking about this for LB5. This prompted a reaction about what was perceived as a move toward object oriented programming.

Here is part of my reply:

Liberty BASIC 5 will not be an object oriented language. LBers will not be expected to learn OO programming.

There have been objects (the UI controls) in Liberty BASIC from the beginning, but I tried to avoid treating them like objects. I'm convinced this was a mistake. Since we have been using objects in our non-OO version of BASIC, we might as well fix the syntax to make it easy to do. The new syntax for programming UI controls is designed to treat them more appropriately.

Instead of printing to a button for example, it makes more sense to call a function on it like so:

#myButton enable(1)

Types and objects are very similar things. Therefore it makes some sense to try and cover them with a unified syntax, and not try to support two different syntax extensions. It makes sense to me to implement types as a sort of lightweight object. This makes even more sense because it will act as a conceptual bridge towards the new BASIC which will actually have a useful OO programming mechanism. This will be the simplest OO feature set I can get away with, and I hesitate to call the new language an OO language.

Friday, April 07, 2006

Interactivity in Programming

One theme that I keep coming back to is interactivity. As much as possible your programming tools should let you affect what is going on at any moment.

A neat new feature in the upcoming Liberty BASIC 5 that I demonstrated in New York is a more interactive debugging capability. Just as before you can start a program in the debugger from the editor, of course. One really cool new thing that you can do is just run the program without starting it in a debugger. You can then at any time decide that you want to debug the program. Just bring any window of the program to the top and break into it. A debugger will open on that program. You can examine variables, or if you like click on a line of code where you want to stop in the debugger and click on the Run To button. Then use the program and when that line of code is reached, the debugger will stop and highlight that line of code and you can see the variables. Then single step through the code, or just click the Run button to proceed full speed.

This is the sort of thing that I'm trying to provide that will bring back the interactivity of classic BASIC, which is one of it's more important features. Most newer programming languages (including most versions of BASIC) are pure compilers and do not let you stop a program in the middle are restart it.

Monday, April 03, 2006

Meeting Details Nailed Down

Okay, the Liberty BASIC 5 presentation at the NYC Smalltalk Users Group will be held Thursday, Apr 6 at 6:30 (actually the meeting starts at 6:30 and my presentation will start at 7:00) at the following address:

440 33th Street 8th Floor
New York City

It'll be great time, and for those interested after the meeting we'll retreat across the street to the New Yorker to spend some time in the restaurant together.

So if you're interested in a sneak peek of the next major release of LB, come and join us!

Friday, March 31, 2006

Smalltalk about BASIC in New York

I've been invited to demonstrate and speak about the new version of Liberty BASIC I'm working on. The venue is the New York City Smalltalk Users Group on April 6th, a Thursday evening. The reason this group invited me is because Liberty BASIC is developed in a version of Smalltalk so it's an interesting project for other Smalltalk developers.

I've been given permission to invite Liberty BASIC users to come also for a sneak peek. The meeting will be held a couple of blocks from Madison Square Garden. I'll post more details about the meeting place when I have them.

I hope we have have a few members of the Liberty BASIC community join us.

Monday, March 27, 2006

Programming for Fun in 10 Minutes

I found an interesting article where the author (Peter Norvig) complains about book titles that promise to teach programming in 24 hours, 7 days, 21 days, etc. He makes a really good point which is that it usually does take several years to become skilled as a programmer. However, in my own experience it doesn't even take a single day to learn enough programming to have fun doing it. Many of my readers will certainly agree with me when I say that doing it for fun is reason enough. If it isn't fun, you're probably not ever going to be any good at it. ;-)

For the curious, here's the link to his article: Teach Yourself Programming in Ten Years

Saturday, March 25, 2006

Evolving a language

Over the years I have tried very hard to maintain a simple and backwards compatible syntax with Liberty BASIC. This has worked well for the most part and most people seem to find Liberty BASIC easy to make friends with.

Sometimes in programming languages it is necessary to be willing to break with the past, especially when bad decisions have been made that hurt the programmer. In Liberty BASIC there is probably one decision in particular that I've been meaning to rectify for some time now, and that is the syntax for interacting with GUI widgets.

Originally it seemed like a cool idea to treat windows and widgets like streams, controlling them by printing to them, and getting information by reading out of them. This was fine in theory, but people don't automatically feel comfortable with this. For example:

'set the font to be Arial of size 10
print #myWidget, "font Arial 10"


Several things about this approach are unpalatable. First, printing to a widget is perhaps more of a leap than most people are comfortable with. Instead they might prefer a straight statement, and not put the command in a string.

The other problem with this approach is that it is just too noisy. I came to realize this a few releases ago and implemented a shorthand without the print keyword and comma, like so:

'set the font to be Arial of size 10
#myWidget "font Arial 10"


Well, that is better but still slightly foreign. Behind the scenes it is exanded to the full form.

Okay now here comes the really difficult part. Since we're sending the command as a string, this can get messy if we want to use variables. We need to concatenate a bunch of stuff together.

'set the font to be Arial of size 10
#myWidget "font ";fontName$; " "; fontSize


Can you say ugly?

Okay, so let's fix this. With Liberty BASIC 5 were going to make another evolutionary step that will give us a lot of flexibility. Instead of treating widgets like streams, we'll treat them like the objects they are. So widget commands will be turned into function calls (or method calls in OO parlance):

'set the font to be Arial of size 10
#myWidget font(fontName$, fontSize)


This is much simpler and cleaner. It is also more similar to the conventions that programmers are used to.

There are also commands which return a value. Here is an example in the current syntax that places the contents of an input field into a variable:

'set myVariable to the contents of this input field
#myWidget "!contents? myVariable$"


In our new syntax you will be able to return a value from a function in the familar way, like so:

'set myVariable to the contents of this input field
myVariable$ = #myWidget contents$()


Were still going to support the old syntax for backwards compatibility, but all the examples and documentation will use the new form.

In addition to using this convention to control widgets, we also hope to use this syntax to add some scriptability to the Liberty BASIC IDE. I'll blog about this in more detail in the coming weeks.

Thursday, March 23, 2006

Microsoft still supports Visual Basic?

I recently received some email critical of my claim that Microsoft no longer supports or provides Visual Basic. I suppose this is a fair point. They do after all still sell a product called Visual Basic.

So what gives? An awful lot of people don't think that the new Visual Basic .Net product is Visual Basic at all. It's more of a version of C# (a Java clone, more or less) with some BASIC syntax thrown on top. It's not hard to use Google to find many articles of people who agree with this sentiment.

Here are some examples that I found in just minute:

http://www.sqlmag.com/articles/index.cfm?articleid=21050&

And from Wikipedia:
http://en.wikipedia.org/wiki/Visual_Basic_.NET#Comparative_samples
http://en.wikipedia.org/wiki/Visual_Basic_.NET#Controversy_concerning_VB.NET

If there's any dishonesty here, I claim that it's on Microsoft's part. For years people complained that Visual Basic isn't BASIC. Now people are complaining that VB.Net isn't Visual Basic. Where does it end? ;-)

Monday, March 20, 2006

Whatever happened to PEEK and POKE?

Sometimes I'm asked how to PEEK and POKE using Liberty BASIC. The short answer to this is, you can't. The long answer is more complicated.

The original home computers (like the classic Commodore 64, TRS-80, and Apple II models) were designed to be completely open to their owners. Most of the different parts of the computer like the sound, graphics, keyboard and joystick (there were no mice back then) were controlled by mapping them to different memory locations. So, the built-in commands didn't do everything you need? It was common to control the computer's equipment directly by sticking values into the memory locations that control that equipment, and reading the status back out. This was done with POKE and PEEK. This was a lot of fun, and usually useful too.

Since these early machines didn't multitask it was pretty safe to steal control of things away from the BASIC interpreter (which was a much operating system as there was). Then computers started running Windows, the Mac OS, Linux, etc. and allowed more than one program to run at a time. PEEK and POKE became problematic because if one program decided to mess with the screen for example, it might interfere with what other programs need to do their thing. Not only that, but computers today all have different kinds of hardware in them, so even if you could PEEK and POKE the exact memory locations would be different from machine to machine. So that's the bad news. :-(

The good news is that we can still have a power trip. How? Your operating system manages all the hardware for you behind operating system functions. These functions make every computer look more or less the same to the programmer. You can use these functions to do a lot of powerful things and most languages have a way to use them. For example Liberty BASIC programmers can use the CALLDLL command to make Windows API calls, which are the operating system calls of the Windows operating system. These are more complicated in general (and you can fill a whole bookshelf with information about them) than the old fashioned PEEK and POKE, but at least we aren't left without some way to pull rank on our computers. ;-)

So if you're missing the power and coolness of PEEK and POKE, why not try your hand at API calls?

Here is a useful link to get you started: http://libertybasicuniversity.com/lbnews/nl108/api.htm

Wednesday, March 15, 2006

Redevelopment price hike?

In a comment to a previous post Isaac Raway wrote: "I see that you note you're going to change the syntax for controlling widgets in the new basic you're working on. Awesome! This may actually make me want to switch to LB as my main platform--maybe."

I'm glad to hear this. The new LB is coming along nicely now.

Isaac continues: "However I'm a bit concerned. I've seen this sort of "redevelopment" happen before, and often times it comes with a higher price tag. One of the strong points of LB I think is that it is truly useful but very inexpensive. I think you're the kind of person who realizes that though, so I have faith you'll keep it affordable."

Well, you're right. Pricing is a marketing issue and it isn't always clear whether to raise or lower prices. I can't promise that I will never raise the price of Liberty BASIC (in fact I've done it before) but I am committed to keeping it affordable. Many times I get feedback that LB is too inexpensive and that I should raise the price, so you see this is not a simple matter to determine.

Also remember that now we have a free BASIC (http://www.justbasic.com).

Thursday, October 06, 2005

Tools in BASIC

Some years ago I wrote a GUI editor named FreeForm in Liberty BASIC. I did this to show my users that they could build interesting software. FreeForm comes with Liberty BASIC, including source code. The Liberty BASIC editor permits users to add tools to the Run menu, so FreeForm comes as a tool on that menu when Liberty BASIC is installed.

I haven't worked on updating FreeForm in several years, but that hasn't stopped it from growing and becoming better. The Liberty BASIC community took over development and they've produced several versions, and some of these have been included with Liberty BASIC. Right now they're working on a whole new version, which I hope may be included in Liberty BASIC v4.03.

Other really cool tools that LB programmers have created have been code formatters, lint tools, and even whole IDE's. Brent Thorn is working on a complete IDE for Liberty BASIC written in Liberty BASIC called ViviFire, which includes a BASIC scripting language so that users can extend the IDE in itself. Extra cool!

Sunday, July 10, 2005

JASIC?

Someone recently mentioned a new up and coming BASIC language product called KBASIC and asked me what I thought. I went to Google and found the site. What I discovered there was so complicated that it reminded me of programming in Java using the Eclipse IDE. Eclipse is an excellent IDE, at least in the sense that it makes programming in Java practical (possible?). You need all the power of Eclipse because Java is a big, heavy and complicated way to write software.

KBASIC seems to emulate Java. Even the style of object orientation presented is very Java-like or C#-like and some syntax is borrowed directly from Java. Why do this? BASIC shouldn't need an industrial strength IDE that is as complicated as the cockpit of an F-15.

This is the sort of thing I am trying to avoid with the new BASIC programming language I'm working on. Java is a mountain of rules and exceptions that the programmer must navigate, never forgetting to dot i's and cross t's. Why make a BASIC that emulates Java? This is the sort of thing that caused outcry when Microsoft did away with Visual Basic and replaced it with VB.Net.

I know that some people enjoy mastering complexity, perhaps as a way to find satisfaction in their work. This is incompatible with the way BASIC programming should be. BASIC should be small, simple and fun.

Saturday, July 02, 2005

On Modernizing BASIC

dave b. responded to my previous post with this (amongst other things):
I hope this nostalgia over the old BASIC command set and the "small is beautiful” fallacy won't hold LB back from evolving into something really useful (which is what programming languages should be).


Really useful for what, Dave? Go and ask the Liberty BASIC community if Liberty BASIC is useful and they will answer with a resounding yes. It is useful for getting a quick program together, useful for learning to program, useful for having fun with a computer, and more too. To make a comparison, Java is also a useful programming language, but it isn't necessarily useful for the same things. There is no universally useful programming language.

I agree with a lot of your ideas, and if you read all of my posts, I think you'll agree that I don't have the simplistic mindset that you seem to imply that I have. I understand abstraction in software better than you apparently think I do.

Nostalgia has nothing to do with Liberty BASIC's faithfulness to classic BASIC syntax, at least not on my part. This is a matter of marketing. You welcome the C-style of doing things with functions. A lot of other people do not. They want an old-style BASIC. I am marketing to these other people. Your advocacy of mutating BASIC syntax into something that is more "modern" does create a new language that is not BASIC, IMHO. Eliminating old BASIC commands and replacing them with functions turns a lot of people off.

I am working on a new BASIC in part to break the backwards compatibility chain with Liberty BASIC. That doesn't mean of course that my new language will necessarily take the direction that you advocate. OPEN "filename.ext" for INPUT as #1 will still be there. I agree with your point that the syntax for controlling widgets in Liberty BASIC is bad, and it will be replaced in the new BASIC. I will do things differently and in an unexpected way, and not to be deliberately contrary but for a reason. I intend to lead with this new language, not follow.

BTW, a lot of people like Liberty BASIC the way it is and don't seem to need anything else. You have decided to move on to another tool that meets your needs better and that's great.

Don't expect Liberty BASIC to become anything but what it is. This is beginning to feel like you're beating a dead horse. :-/

Friday, June 03, 2005

What's my story?

As an implementor of BASIC, where am I coming from?

The home computer, a way back machine - In regards to the BASIC programming language, I think my strongest formative influence comes from working with old home computers. There was something wonderful about these machines that plugged into the family television set. They were simple when compared to computers now, and you could get your mind around them. You could master the whole computer because all of the details fit in a 5x8" spiral bound manual a couple of hundred pages long.

Personal Mastery - Perhaps similarly, I used to work on my own cars. I loved working on old Volkswagen Beetles, and I owned a bunch of them. I knew pretty much everything about the Beetle, and I loved knowing all about it. It's about that feeling you get when you master something. Nowadays I take my cars to the experts because I simply cannot understand the new cars. If it breaks down, I call a tow truck. It's harder to love cars today. This is how computers have become.

Interactivity - Let's see. Just like you can take the parts of an old car and flip them over in your hands, see how they fit together and what makes them tick, programming in BASIC on a home computer was like that. You could stop your program, look at variables (flip them over in your hands, so to speak), execute a little line of code on the fly, and resume execution at any point. If you wanted to mess with the video mode, or tweak the sound, or read/write some memory value, you could. The very nature of the machine permitted it. There is was, all laid out before you like clay in your hands and it was not so vast that you were overwhelmed by it all.

BASIC today - So I really feel that if at all possible BASIC programming should still be like this, but it mostly is not. Most BASIC languages today are compilers. This means that once you start to run your program, you cannot just stop it and tweak it. You can't change the code of a running program without needing to restart the program from scratch. In addition, the huge functionality of modern operating systems inspires programming language implementors to continually make their BASIC languages bigger and bigger. This is an artificial barrier to personal mastery.

The reverse 80/20 rule - Okay, since only 20 percent of the Windows operating system functionality is needed 80 percent of the time, why create a programming language that tries to embrace all of it? Home computers did most of what a computer is useful for, and compared to computers today they didn't do much of anything. The reality is that an awful lot of useful things can be done with a very small language.

Small is beautiful - Balance is also beautiful. BASIC should try to strike a balance between being small, and also supporting the most often needed features of Windows, the Mac OS or whatever operating system it runs on.

Aesthetics matter - How does your BASIC language look, like BASIC? I'm not kidding. Many programming languages today that call themselves BASIC don't look anything like BASIC. Tacking ideas and syntax onto BASIC from other languages only complicates things. If it doesn't look like BASIC, it isn't BASIC. I don't mean this in a snobby way. I just think that the feel of the original language is worth preserving because it had a nice simple down to earth quality. Removing that quality also removes some of the fun, and I don't see why we need to do that. ;-)

Friday, May 20, 2005

Why languages like BASIC are important today

I think it is important that most programming can be done with simple tools. BASIC fits well with the idea that it should be as simple as possible, but no simpler. The average person cannot commit to learning programming languages that need several thick books to explain them. Before you can get anywhere, you need a language that's comfortable to start with. How else can QBasic's tremendous staying power be explained? The last version of QBasic rolled out of Microsoft 13 years ago, and a quick Google search for QBasic reveals nearly a half a million hits!

I also believe that there is a lot of arrogance in the established programming culture. Many software professionals (some of whom aren't especially good at what they do) look with disdain on the users of "hobby languages". Not everyone who writes software does so as their sole profession. Some people need to write small programs for their own use, and so they can be the sole judge as to whether the software is good enough. Other people will only program for fun, and they should not need to answer to anyone.

Once when I gave a demo of Liberty BASIC to a fellow programmer, his response was, "Who would want to use that?" To him it seemed like a toy. He doesn't understand that not everyone needs or wants all the power and complexity of C++.

Thursday, May 19, 2005

Programming and Love of Learning

One of the things I really love about programming is that I love learning new things, and programming is a great medium for working in ideas. Once programming becomes simply work, the spark is gone and it's better to go find something else to do.

Almost 20 years ago I taught myself C, which I really liked a lot at first. That programming language has some ideas that were pretty interesting to me coming from BASIC, but it became clear to me after a while that C programming is more about twiddling the drudgery bits and details than it is about expressing ideas. Don't get me wrong, C is great for certain things. If I were an operating systems builder I probably wouldn't use anything else.

I don't program in C anymore, but I wouldn't discourage BASIC programmers from learning C or any other language. I learned a lot of ideas from my experiences with C, Forth, Smalltalk and Java. There's no substitute for trying a new language. Even if you still only use BASIC it will change your programming style when you are exposed to new ideas, and you will also have more fun.

Learning. I heartily recommend it. :-)

Monday, May 09, 2005

Programming - Is the word worn out?

You know, I'm wondering if there doesn't need to be a new word for programming. I mean, it's a fine word and all, but it already has too much baggage and history.

How can we get young people interested in programming? We need a new word. One of those cool (kewl?), hip new words. Something that implies a sense of fun and excitement. When the web was born, the word surf was adopted.

Obviously we cannot just come up with a fresh new word and apply it to the technically mundane programming languages like Java, C++ (or Fortran). The word has to apply to a new and fresh kind of programming.

Wednesday, April 27, 2005

BASIC, not BATAP

This blog is about BASIC, which means Beginners All purpose Symbolic Instruction Code. If it were about Being All Things to All People, the language would be call BATAP. ;-)

I'm inspired to write this because of the plight of General Motors. The world's largest auto manufacturer is losing money in droves. The reason is in their name, the first word of which is General. The problem is that there is so much competition in this world today, that being general is not a strength. If you want to get people's attention, you need to specialize.

BASIC also needs to specialize. The key ideas it needs to specialize in? Easy, simple, approachable, and fun. Does it have power? Yes. It has the kind of power that gives the average person the ability to program computers because of the four qualities I just listed. When Microsoft created Visual Basic (now officially unsupported by the way) they took BASIC out of the domain of the everyday person and tried to make a professional tool out of it. They should have called it Visual BATAP.

BATAP can never be BASIC.

Sunday, April 03, 2005

BASIC Overloaded?

One reader posted a comment to my last post on the cult of complexity. He remarked on how the OPEN statement in Liberty BASIC is used to open not only disk files, but windows and DLLs. He expressed his desire for a further extension of OPEN for managing TCP/IP sockets. The thing is, I have been planning to do this for some time, and expect to see it in Liberty BASIC v5.0 when it makes its debut.

Using a command for many different things is called "overloading" by programming language designers. So, the OPEN statement is overloaded in Liberty BASIC. This is one of the techniques I use to try and keep BASIC small. I could have added more commands. Maybe for opening a window I could have added CREATEWIN and for accessing DLLs I could have added MAPDLL or some similar name. This might have been okay, but it doesn't keep the language small. I think is crucially important to minimize growth because of the ever expanding list of things a programming language is expected to handle. If I don't fight growth, pretty soon Liberty BASIC will be unmanagable.

If you have ideas that are very close to each other (like opening a file, a window, a socket, etc.) it makes a lot of sense to overload the commands that access them. This can be taken too far, but usually I believe that it isn't taken far enough. Programming languages need to be more general.

Sunday, March 20, 2005

The cult of complexity

Just the other day I noticed that someone posted a review on Download.com 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
* TRS-80 BASIC
* Applesoft BASIC
* Commodore BASIC
* MBASIC
* GW-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?

Tuesday, February 22, 2005

BASIC and the Original Personal Computers

Before the IBM PC there were Home Computers, of which there were many, many brands and models, all completely different from each other. Usually a Home Computer plugged into your television set, even though you could buy a monitor if you wanted a sharper picture. I loved the Home Computers because they were all a little different from each other, each inspired by some designer's whim. That was great because it made you think when you saw something that was a new idea.

Once the standard IBM PC was introduced, the market began to do nothing but make copies of this machine. This was actually a kind of death to innovation, and at a time when small computers were still very immature. Our industry decided that all computers should be like this 'IBM thing' when we didn't really even know yet how to build computers. In most respects, today's PC is still just a faster and bigger version of that now 25 year old design. :-(

One key thing that was really great about the Home Computer was its programming language, which was almost always BASIC. Each version of BASIC was a little different, but close enough that you could sit down in front of a computer you've never seen before and start writing something right away.

Another important quality of the Home Computer was its simplicity. Most of the time you only needed a couple of hundred pages to explain how to make any computer's hardware do whatever you wanted. All the graphics and sound, keyboard, joystick, I/O ports, memory maps, etc. were completely documented. And these things were also simple enough that you didn't need a degree to understand how they worked. BASIC made this even easier because you could use the command line interpreter to interactively play with the hardware. This was really personal computing, in the truest sense of the word.

IBM PC is a misnomer.

Sunday, February 13, 2005

Aspects

One of the big buzzwords in programming today is 'aspects'. More and more systems claim to be aspect oriented. Just what does this mean?

An aspect is like a perspective. If you look at the back of your hand, you will see those things that are about its backside. That is an aspect. If we do the same with software, this gives us a useful tool. If we take a video game for example, we might have several aspects:

- Display
- Sound
- User input
- Game rules and behavior

What is the point of all this? If we work hard to write libraries of code about these parts of the game, where these different parts of the program don't refer to each other, this gives us a useful level of interdependence, or decoupling as it's calling in software engineering. This is what aspects are for.

If we make each aspect of our programs independent from each other, this makes them easier to understand, to re-use in other programs, and to debug.

Most aspect oriented software use objects as a way to make their aspects work, but this isn't required. You can use the tools at your disposal to do the same thing. The main tool is your brain.

Some tips:

- Don't use global variables without good reason
- Give preference to SUBs and FUNCTIONs over GOSUB/RETURN
- Name things well so it's easy to answer the question "Does that belong in this area of my program?"

Finally, don't get hung up on the word 'aspect'. It's a useful word for thinking about software design, but it's just one word. ;-)

Thursday, February 10, 2005

Building Systems in BASIC

Let say you want to write a program in BASIC that manages sales information for a small store. You need to write code for the following things:

- Data entry+User Interface
- Database management
- Reporting
- Graphing

Okay, fine. You create a program called salesmanager.bas and create sections of code for each subsystem. As you build your library of code, you run your program to try it out. When you're done trying out your program, you shut it down and go back to writing more code. Then you try your program again, etc.

This is the traditional way to create programs, and it works great for small programs. When a program gets large, it takes longer and longer to start up the program and try it out.

What if your BASIC could *also* do it in the following way?

- Create a program called salesdatabase.bas and write the simplest possible database manager (one that doesn't really do anything). Start it up and give it a runtime name SALESDB. Leave it running.

- Now create another program called salesui.bas that implements the simplest GUI. Start that up and leave it running.

- Write a function to salesdatabase.bas for adding a new sale and save it. It becomes available to the salesdatabase.bas program that is already running!

- Now add a menu and subroutine to open a simple dialog box for the salesui.bas program. This dialog box code contains a call to the add sale subroutine on the SALESDB program. Without restarting the GUI, the menu is available. You can test it immediately!

Keep adding more code to these programs and 'grow' them a little at a time. Add the reporting and graphing modules to your system in the same incremental way. You can build a large system in this way by 'growing' it in little bite sized ways.

Saturday, January 29, 2005

Objects and BASIC?

As an implementor of a BASIC language (http://www.libertybasic.com/) I have a lot of people write me with their suggestions. This is a great thing. Some people ask for object oriented features. I know this is all the rage, and I understand object oriented programming well because I've been programming in Smalltalk since 1988, and Java for 3 years. Smalltalk is the first modern object oriented language, and a darn good one.

Here's the problem. BASIC was not conceived as an object oriented language. Just as many implementors of contemporary BASICs have made the language unrecognizable by piling the features of C and other languages on top of it, an object oriented BASIC risks becoming some other language entirely.

Any really good object oriented language is objects all the way down. In these languages (Smalltalk and Self for example) even numbers, strings, and boolean values are objects. Everything is treated uniformly. It would be a supreme challenge to redesign BASIC so that it had this kind of uniformity. It just wouldn't look like BASIC anymore. :-(

This doesn't mean that BASIC couldn't be extended to have some object oriented ideas. To do so it would be important to identify what the simplest and most useful ideas of objects are, and to invent a very small syntax extension for the BASIC language to support these ideas. I think any object oriented extensions should be simple and consistent enough to be learnable in five minutes. The goal should be maximum bang for minimum buck. Otherwise, why bother when there are already so many other object oriented languages?

Saturday, January 22, 2005

Simplicity Revisited

In my last post I explained that classic BASIC was implemented as an exploratory programming environment. It occurred to me that my earlier post about simplicity touches on an extremely important aspect of BASIC's exploratory qualities.

List most software today, programming tools do 101+ things. This reminds me of a Nova documentary I saw about jet fighter planes. The cockpit of a modern jet fighter has more dials than a clock store and more buttons than a sewing shop. The documentary explained was that these were all there so that the pilot would be able to do lots of useful things. As it turns out, not many of the things in the cockpit are useful for flying an airplane in combat.

As an exploratory programming language, early BASIC was simple to learn. There was no GUI. Windows, icons and other graphical features do not always improve software (although they can). There were only a few commands and ideas that you needed to learn. Was this enough? Maybe not, but its simplicity is one of the essential concepts that made it successful.

"Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939

Friday, January 14, 2005

Exploratory Programming and BASIC

One idea that hasn't been written much about lately in the computer press is "exploratory programming." This idea was very popular about a decade ago and it refers to powerful programming tools that make it easy and quick to try out different ideas. Smalltalk is one of the best examples of an exploratory programming environment. Smalltalk lets you make objects that "live" in your programming IDE and then you can play with them to see what happens. You don't need to compile a program at all to build software. Why does this matter? Exploratory programming helps make programming easier, more fun, and less intimidating. You can play around with little pieces of the program you're trying to create until you feel that you understand it well enough to put it all together.

Okay, what does Smalltalk have to do with BASIC? I'm glad you asked. :-) BASIC was originally conceived as an exploratory programming tool. BASIC has an interpreter loop, just like Smalltalk. Write a little code, use RUN to execute just a piece of your program if you like. Stop a running program, check the value of variables and change them. Rewrite just a line of code if you like. Restart the program. Execute code without even adding it to your program, straight from the command line. Most BASICs on home computers would let you play with the hardware, from graphics to audio to devices connected to an I/O port, again straight from the command line. You were free to explore.

Sadly BASIC is not like this anymore. Almost all BASIC language software today compiles to a program that cannot stopped, tweaked, modifed and restarted. Even our own Liberty BASIC http://www.libertybasic.com are like this (except that Liberty BASIC you can evaluate code in the debugger and by using the eval() function).

We are working on a new BASIC to bring exploratory programming back. This will not be an old fashioned line numbered interpreter. This new BASIC will provide a workbench where you can make changes to running programs, and where you can try out small or large BASIC snippets just to see what they do.

More information coming...

Saturday, January 01, 2005

Simplicity

There was an interesting thread on our conforums site http://libertybasic.conforums.com recently where we discussed Windows API calls. Someone mentioned that the most useful API calls should all have BASIC equivalents.

I understand the reason this was suggested, but I have to disagree. I don't know how many people come to Liberty BASIC because they tangled with Visual Basic and found it to be too large and complicated. I program in Java for a lot of my work. It's big and unwieldy (it wasn't when it arrived in 1995). I can vouch for small is beautiful.

Most programming tasks don't need a big language.

Another important point to keep in mind is that as we move toward Macintosh and Linux versions of Liberty BASIC, we'll have to be very careful not to add many platform specific commands.

Tuesday, November 23, 2004

The death of programming

Why don't people create their own software anymore?

1) They don't have to. They can just buy what they need.

While this is true, there are so many times when packaged software doesn't do exactly what is needed. There are also so many kinds of useful software that could be written that will not make it onto store shelves.

2) They don't know that they can create their own software.

In fact they may even wonder why they should bother. They don't know what they're missing if you ask me. Programming is a much better way to spend brain cells than watching TV or surfing the web.

3) It is really hard to create software with the popular languages (Java, Perl, C++).

This is not possible to overemphasize! Why these intractable wrecks have become popular is beyond me. Don't get me wrong. These languages have their place (except for Perl, I mean), but they aren't suitable for the average guy or gal. These are programming languages for lawyers.

4) The computer doesn't come with an easy to use programming language anymore.

This is SOOOO important. It used to be that when you turned the average computer on, the first thing it did was start BASIC. You could start programming immediately, and it was very easy to pick up. Nothing bad happened if you made a mistake, and it was fun!

5) People think that programming isn't an important part of computer literacy.

Everyone will admit that it is good to understand cars if you are going to drive one. It helps you to drive more safely, and if you break down somewhere you stand a chance of helping yourself out of a tough spot. It is no different with computers. If you learn to program computers it helps you to take advantage of them, and not the other way around.