Monday, June 01, 2009

Joy in Programming

I responded to a post on another blog (http://blogten.blogspot.com/2009/05/wards-comment.html) about how someone complained that the Smalltalk programming language permits the programmer too much freedom and that it's "too easy." The argument against being easy is that if it's too easy the programmer will be able to rush into creating software that is designed poorly. I have a hard time believing it is ever a benefit that something is hard to do. I think this applies to languages like BASIC so I'm copying what I posted there below.
Freedom is essential if you want to live life to the full, and not just in software development. We need to teach what is the best way to live in freedom, not impose a tyranny of suffocating "safety". If we don't build a culture of discipline and excellence then we deserve what we get. If we impose tons of rules to in an effort to prevent people from making mistakes we risk making software development such a burden that few people will want to do it anymore. It should be possible for software development to be an enjoyable activity, and for innovation and discovery to be experienced by newbies and experts. Joy is important in life.

Perhaps I oversimplify, but I hope this communicates an important idea effectively.

Saturday, January 03, 2009

Easter Eggs?

Here's a link to a fun article about how Microsoft added Easter Eggs to their original BASIC implementations.


It never even occurred to me to do this.  ;-)

Monday, December 15, 2008

Imposter?

I found an article named Web programming is hard to do right by a fellow named Bert Hubert. He does a nice job of explaining what is so hard about web programming and then goes on to describe how it could be done right. He even includes some BASIC code as an example. I like the questions he asks:
  • How did we arrive at this mess?
  • That's just the way it works, isn't it?
  • How should it be then?
  • Why not go back to the old days?
This article really resonates with the ideas that inspired Run BASIC. We need more people who think this way.

He provides some C-like code implementing what the BASIC code does. I guess that this new scripting language is code for a language called Imposter by Gabor Vitez which he mentions in a note at the top of his article.

I did a quick search for information about Imposter and its author but it seems to have withdrawn from the Internet. Does anyone know where to get a copy of Imposter to have a look?

Friday, December 12, 2008

Getting the word out about Run BASIC

I've been working on a whitepaper for a while now that tries to explain what it is that makes Run BASIC special and I've finally published it. It's titled "Run BASIC - A Breakthrough Web Application Server." Check it out here

It isn't usually wise to toot one's own horn too loud but I really believe that Run BASIC is unique. The trouble is that people are so overexposed to hype that they don't really easily believe that Run BASIC is different. In fact one person who helped me edit the whitepaper recently contacted me after trying Run BASIC and explained that he didn't realize how easy it really is until he tried it out.

Monday, December 08, 2008

Run BASIC v1.01!

I'm excited to announce that we've released Run BASIC v1.01. In addition to the Windows version, this is our first release for the Macintosh and also for Linux. Now we also have a free edition (not time limited!) so you can go and try it on your own computer. Run (don't walk) immediately to http://www.runbasic.com/ and get your own copy.

Friday, November 21, 2008

Teaching an old dog new tricks

One reader commented, "So should a basic language add object-oriented features? For me, it would simplify things. Inheritance and polymorphism produces much less code, and FOR ME, much more simplicity. However, for a procedure-oriented person, only complexity has been added."

This is an excellent point. One way that I've tried to add objects to Run BASIC is to have some built right in. You don't have to create them and you don't need to import them, but you can start using them. This is hopefully one way to begin to help procedural programmers warm up to objects and there's no reason why the rest of the program cannot be written in a procedural style.

The other thing that Run BASIC does is take the RUN statement and adapt it so that other BASIC programs that you run can be optionally treated as objects, or if that's too far of a leap you can think of it as a modular library of code, like so:

run "mymodule.bas", #module
#module doMyWork("some string")


Thursday, October 09, 2008

Flight Simulator in BASIC

I remember years ago that there was an instrument-only flight simulator written in BASIC and ported to different computers.  It wasn't much to look at because it was all character based.  Tom Nally has just released an open source flight simulator written in Liberty BASIC.  This one blows the doors off that old classic.  Check it out here.

Monday, October 06, 2008

BASIC for the web a killer app?

If you ask the average geek worth his salt what was the killer app that launched the microcomputer revolution the answer would probably be "Visicalc, of course!"

I take issue with this answer. Long before the spreadsheet application Visicalc was a gleam in Dan Bricklin's eye the most important and powerful application for small computers was the BASIC programming language. Without Microsoft BASIC (and this is Microsoft's real and lasting legacy if you ask me) very few people would have been able to do anything useful with computers. Most versions of BASIC back then were variations on Bill Gates' original BASIC interpreter.

Without BASIC we would not have seen so many kids grow up to be programmers, myself included. This is the very reason why I work on BASIC language products because I believe that there's no good reason why anyone with a little desire and time shouldn't be able to create software.

Run BASIC is very much in the same spirit as the early BASIC, but for the web. Now anyone can create web applications. :-)

Run BASIC - Killer app for the Internet age!

Sunday, September 28, 2008

Run BASIC for Windows, Mac and Linux

Tonight I am pleased to mention that we posted Run BASIC v1.0.1 beta 3 for Windows, Mac OS X, and Linux (tested on Ubuntu). This is our first ever release of software for Linux, although people have been successfully using the Windows version using Wine.

It shouldn't take more than a couple of weeks to finalize v1.0.1 and release it. If you haven't had a look at Run BASIC check out the site. Make sure to watch the videos posted there to get a complete sense of just how easy web programming can be.

Thursday, September 25, 2008

Eating my own dog food

Run BASIC comes with a bunch of example programs, one of which is a wiki called runWiki. It's about two pages long and is remarkable for what it does in those two pages, including the use of the SQLite database to store pages.

One of my customers (Neal) took that wiki and added a bunch of cool stuff to it like user accounts and many more formatting tags.

Now I've decided to take Neal's version of my original runWiki and use it to host a site for a civic group in the town of Ashland, Massachusetts where I live. It went live last weekend to coincide with the annual Ashland Day faire. Check it out at http://www.weloveashland.com

It's a pretty simple site which will get more sophisticated as we go. The beautiful thing is that it acts as a vehicle for producing runWiki3. I can customize it to my hearts content since I have all the source code in BASIC, the people's language. ;-)

Wednesday, September 24, 2008

Free version of Run BASIC

One thing that has been lacking in our effort to promote our Run BASIC web programming system is a free version. In fact there is no time limited trial either. This has been mostly because we have been unsure what would be the best way to do it.

What we've decided on is when Run BASIC v1.0.1 is released soon for Windows, Mac and Linux we will also release a free version. This free version will be for personal use instead of being a web application server. Users of the free Run BASIC will be able to create projects and use any features of the language, but they will not be able to serve applications. This will allow them to experiment and see if Run BASIC meets their needs. If it does and hosting the application is in the cards then an upgrade to the server version is available for $59.95, or hosting service can be purchased at http://www.runbasicnet.com

Comments and suggestions are most welcome.

Monday, September 22, 2008

Out of control!

On a Java project that I work on part time we use the Eclipse IDE, which is a power tool for Java programming. Java itself gets hard to deal with once your software gets to a certain size, and Eclipse tries to do a lot of the hard work for you. Java would be unusable without such tools.

On the flipside to this, we had been using an older version of Eclipse. Ultimately we decided to upgrade to a newer version (but not the latest) because we wanted to use Subversion instead of CVS for our source code control.

One of my colleages decided to attack the upgrade and document what was needed for everyone to use the new version. It seemed like it took him many days to figure it all out. The new version didn't look too much difference on the surface, but I kept hearing groans from him. Clearly something wasn't going well, so I went over and asked him what was the matter. His answer was simply, "I can't figure out how to do things that I used to know how to do!" The new software was getting bigger and more complicated.

There's a balance to strike when developing software. It's hard to make software easy to use while also adding new features.

Monday, May 19, 2008

Rewrite BASIC language today?

In the Usenet group alt.lang.basic there was a thread recently with the subject heading "Rewrite BASIC language today?" where the question was explored about how BASIC would be written in today's programming world.

Clearly there is a wide range of opinions in the responses. Some opted for being retro and simple. Some advocated adding commands for dealing with various things. It's good to have a discussion about these sorts of things, and this one went well. There are a lot of experienced BASIC programmers in that forum and it didn't turn into a flame war.

In my own response I wrote "BASIC needs to be simple. Adding C or Java features is a mistake for the most part. There is value in keeping things out of the language."

There needs to be a balance. Sometimes it makes good sense to add new things to a language. But as I just said... sometimes. ;-)

Tuesday, March 25, 2008

Commodore 64 Twenty-fifth Anniversary

Here is a YouTube video of a 90 minute presentation celebrating the 25th anniversary of the Commodore 64 home computer. The C64 was a groundbreaking machine and I know I'm not the only one who learned a lot from this wonderful machine and similar ones like the TRS-80, the Apple II, the Atari 800, and the TI-99/4. I programmed Commodore computers in BASIC, 6502 assembly language and Forth. Great stuff.

Go check this out for a fun romp into the past. The presentation touches on much more than just the C64. http://video.google.com/videoplay?docid=3754836267385299753

The Definitive Guide to SQLite, a PDF Download

Notice: I'm not sure anymore that this is a legally available file, so I've pulled the link until further notice. You can still purchase the book online at http://apress.com/book/view/1590596730

Here is a link to a PDF for the book The Definitive Guide to SQLite by Mike Owens. This looks like a great resource for Run BASIC programmers. :-) The download seems to take a while, so I wonder if their fileserver is swamped. I guess this is a very popular download.

[link removed]

Followup: For those who have been unable to download the entire file. It took me a few tries, and you may even try some other browser. Safari worked better for me than IE.

Thursday, March 06, 2008

Net Neutrality

I'm not an especially political person, but Net Neutrality is an important idea that deserves all of our attention. Essentially since the Internet was recently deregulated, broadband providers are now allowed to prioritize and block traffic. Imagine if suddenly you were unable to Skype your best friend in another country, or if Google became inaccessible to you. What if the online community in a message forum you came to know and love was destroyed because access to it was now impractical to certain key members? What if an online business was suddenly destroyed because they no longer received the visitor traffic they once did?

Net Neutrality is a movement to protect free and unhindered access to Internet resources.

Ethan Poole wrote an excellent article about it here:
http://www.lowter.com/article/net-neutrality/2

Saturday, March 01, 2008

Think programming is too hard, or boring? Think again!

A couple of days ago I was at a Starbucks. I sat down around a large table to enjoy my coffee and a pastry. There were several other people there. I pulled out my iPhone to check my email. There was a fellow across from me with one of the new Macbook Air laptops, and a few minutes later a young man also sat down and pulled out a black Macbook. This concentration of Apple equipment made it easy for us to begin talking.

When it came to what sort of work we do, I shared about my business selling programming tools. I moved over to the fellow with the black Macbook and told him I wanted to show him my website so he could understand my business. When I showed him the Learn tab on the Run BASIC site and began to walk him through the examples the other people at the table came over to watch. As we went from simple "hello world!" to some easy graphics examples the reaction from onlookers was amazement! They clearly were not aware that programming could be so simple and cool. To them this was something way above them, and very dry.

What I took away from this is that people don't know that programming can be fun. They can do it, and years ago the average computer user did his own programming, in BASIC. Nowadays what gets promoted as programming is too hard, and it's no surprise that people don't want to do that. This is a misapplication of technology that makes things harder, and not easier.

We need to turn back the clock in this important area of programming.

Tuesday, February 26, 2008

iPhone SDK delayed?

It's beginning to look as though the iPhone SDK may not ship this month since Apple has been silent about it. It was supposed to ship by the end of February. Of course this doesn't really have any impact on Run BASIC since it will not use the SDK, but it will produce apps that run in the iPhone's Safari web browser.

We haven't talked much about our plans for iPhone support in Run BASIC. We should have more to say in the next month or so.

Thursday, February 21, 2008

BASIC is bad because it's too easy?

A response to a recent post read, "BASIC is good, but I think it should be avoided as a first language because it pampers the programmer too much."

I won't be the first person to say that BASIC is perfect. There is no perfect language. However, to recommend that a first language should not "pamper" the beginning programmer seems to me misses the mark completely.

I'm guessing that this means that languages should force the beginner to be aware of low level details such as the type of numeric value (int, float, byte, etc.) or that the beginner should made to manage the allocation and deallocation of memory. What do these sorts of things have to do with the essense of programming? Since there are many languages which do not have these kinds of features, I can only submit that they aren't essential to programming. Therefore they are not necessary ideas to teach the beginner.

The nitty gritty details of how a computer works ARE important. These things should be taught to any serious student of computers, but they do not need to be the first thing taught. People who do not fancy themselves experts do not need to be bothered to learn them.

Easy is the quality that BASIC has, especially in the quickness of its learnability. This is almost to a fault I agree in the sense that a slightly more general and abstract language might be a little harder to warm up to but better in the long haul. However for the person who programs for fun, or who needs a light language for writing utilities or small personal applications, I think BASIC hits the mark pretty well.

Thursday, February 07, 2008

Taking the Arc Challenge

Paul Graham, a very famous Lisp programmer who is well known for his continuations based web framework has invented a language called Arc (a version of Lisp). He came up with a challenge to see how others would implement a trivial web program in their favorite language.

Here's the Arc program:

(defop said req
(aform [w/link (pr "you said: " (arg _ "foo"))
(pr "click here")]
(input "foo")
(submit)))

Follow this link to see other submissions in different languages. Scroll down to to bottom to see the Run BASIC example. http://arclanguage.org/item?id=722

Now tell me which language you'd rather develop web apps in. BASIC is the one. ;-)

Wednesday, February 06, 2008

Web programming in... Java?

I mean, why? Of course that's how I feel about any kind of programming in Java. I recently found a blog where someone reviewed Wallace Wang's Beginning Programming book which teaches Liberty BASIC. The blogger seemed to enjoy Liberty BASIC and then went on to say that we was planning to learn Java. I wish that those presidential candidates would promise to reform our educational system by banning Java from k12 schools. People who are just learning programming need something that gives them a tighter feedback loop like BASIC does. If the learning experience isn't at least a little bit of fun it won't benefit the kids. Period.

People who trash BASIC haven't tried modern versions. Even the old DOS QBasic has everything the beginner needs.

Monday, February 04, 2008

Knocked on the head with BASIC

A close friend of mine schooled in C++, Smalltalk, Java and Groovy told me the other day that he has written his first BASIC program by using Run BASIC. He had never written code in BASIC before, but he took my word for it that BASIC is a great language for throwing together solutions quickly. He said he was struck by the lightness of the BASIC language and that he enjoyed working in it. This is my paraphrase of what he said, because I don't remember his exact words.

I know there are a lot of modern BASIC implementations that force you to declare all your variables and give them types and sizes. Some of them keep the core keywords but add Pascal syntax, and some make BASIC look more like Java. I know there are some benefits to the way these other languages work, but BASIC is really meant to be very light and simple. In my humble opinion any language claiming to be BASIC which forces the programmer to dot too many i's and cross too many t's is not BASIC, but an imposter.

BASIC is a small language without too many rules.

iPhone development - activation experience

Since we have decided to create some iPhone development features for Run BASIC I bought an iPhone for this purpose. I thought it would be interesting to post my personal iPhone experience.

So, I went to the Apple store. I said that I wanted to buy an iPhone, so the youthful Apple employee grabbed me a small black box from behind the counter and handed it to me. "Big day," he said with a certain air of importance. I thought that was a little over the top. I mean, it's a phone. I wasn't having a baby. My daughter put it well, "Maybe if he was going to give you the $400 phone for free it would have been a big day." Ah well. I suppose Apple store employees can be forgiven for drinking the corporate koolaid. ;-)

I told him that I was buying the iPhone because I am working on easy development tools for it. He didn't quite get it right away that I wasn't working on iPhone apps for people to consume, but a really easy way for anyone to create their own iPhone apps that run in the Safari browser. I explained more carefully and got a gratifying 'Ahhhh' response from him. Gotta work on that marketing message.

So I took the phone home and unpacked it. There's no manual at all. There really should be for that price.

Alright, I understand that you activate the iPhone using iTunes. I am a Mac user (and a PC user) so I thought I would activate the phone from my Mac. That didn't work. I needed a newer version of iTunes. No big deal. I downloaded and installed the latest. Still no good. Why? Because then I discovered that I needed OS X v10.4.x or better. What then dawned on me made me a bit angry. I was going to need to activate the phone using iTunes on Windows. I think that qualifies as mistreatment by Apple of its customers.

Okay, so now I upgraded to the latest version of iTunes on my Vista box. I plugged the phone in and activated it. It went smoothly from there.

I'll post more about the iPhone and our work to support it using Run BASIC in the days to come.

Thursday, January 31, 2008

Debugging Run BASIC Web Apps

In Run BASIC's first release there is effectively no built-in debugger. Of course you can use print to log to the browser page or to a file, and this is no more or less than many other web scripting systems. We aim to do something about this in the very near future.

One of our users suggested that it would be good to create an inspector panel in Run BASIC itself and that we should add some reflection via an EVAL$() function that would allow arbitrary execution of BASIC code at runtime. We would probably also need to at least metaprogramming features like the ability to get information from the runtime like:
  • The name of the current context (ie. function or subroutine)
  • The names of all the variables and arrays in scope
  • The source code for the current context
  • A collection of objects that models the stack
  • Probably more stuff

While this sort of thing is possible I think that we probably will initially provide a high level runtime inspection panel that the programmer can show and hide as needed. This is BASIC after all, and it should be as easy as possible to use. The metaprogramming stuff is cool though. ;-)

Monday, January 28, 2008

Web Programming for Fun

There has always been a culture of complexity-worship in the programming community. Some people seem to think that the Internet is a good excuse to take this even farther. This takes the fun out of programming, and it scares a lot of people away from even trying it. We think that this needs to be pushed back against. One of our goals in creating Run BASIC has been to make web development so easy that anyone can do it. As a language designed to make programming simple, BASIC is an ideal platform for realizing this idea.

We need a culture of simplicity. The computer should do that hard stuff for you. For example web application servers manage user sessions and processes, and these are things that require special administration by an expert in most web systems. With Run BASIC, except for a couple of fields in the Preferences tab that let you configure how long the timeouts are for sessions and processes, you don't really need to know anything about these. It's all done for you automatically.

Or for example let's say you want to draw graphics? There are no add-ons that you have to locate, download, and install with Run BASIC. It's all built right in, and just a few lines of code can draw some meaningful graphics into your web apps.

It's easy, and it's fun.

Sunday, January 27, 2008

Run BASIC - Zero Configuration Web Application Server

I found a blog post today that compared PHP with Ruby on Rails in terms of how much easier PHP is to install and configure than Ruby on Rails. Both of these systems are composed of at a minimum:
  • A web server (usually Apache)
  • A language interpreter for PHP or Ruby
  • And usually a database server

And this is a simplification. The user needs to install and configure these things which requires knowing about a lot of esoteric stuff. If you've never done this before, you can lose some of your hair. Unless you like pain, why put yourself through this?

If you want to create your own web applications, Run BASIC will install everything ready to run in one shot. http://www.runbasic.com/

Why do people put up with complex programming systems? Because for more than a decade they had much harder tools, so now they think PHP and RoR are easy.

Friday, January 25, 2008

Run BASIC Tour Video Posted

One big challenge we face in explaining Run BASIC to people is that people have a preconceived notion of what an easy programming system is. Ruby on Rails is supposed to be easy, right? Easy compared to what? Java server pages? Apache and Perl? For a certain class of problems we need the kind of easy that BASIC (and I don't mean Visual Basic) has always provided.

So, today I created a 20 minute video that walks through installation, startup, and gives a tour of the features of the Run BASIC programming software and several examples. This includes creation and hosting of a simple app. Visit the Run BASIC site and check out the video and I'm sure you'll agree that you've never seen anything easier.

Web Debugging

The topic of web debugging in Run BASIC came up today in the forums, and the topic started with some ambitious ideas from Bill W. who always has something interesting to say (here for example).

Run BASIC does need a debugging facility. I realize that most web programmers probably write to logs, and you can do that in RB without adding anything but we can make it a lot easier. Just for starters I was thinking of adding a logging object of some kind. A debug button would be added to the toolbar, and then you could specify either logging of all variable changes, or specify watches so that only certain variables would get logged, and a LOG statement could also be added that would only log if the program is executed in debug mode (instead of merely run).

Also, it would be no hard matter to include an inspector object which could be rendered into the page whereever it is convenient for the programmer. You could examine and change the value of variables, and perhaps even execute code dynamically on a running program in the web browser.

I'm eager for feedback on this!

Thursday, January 24, 2008

BASIC Back By Popular Request

Sales of Run BASIC have been pretty strong since we launched it on Jan 5. It's been really encouraging to see our users post about their experiences. People are building a lot of really neat things with it.

One thing that people seem interested in doing with Run BASIC is to use it as a frontend interface to various systems like home automation, machine control, monitoring and such. So requests for RS-232 serial port access, hardware port I/O and even USB devices are a hot topic. See this thread.

Hobbyists and people who take it upon themselves to automate their own work without the help of IT experts have traditionally used BASIC, and we intend to make Run BASIC work for them.

Tuesday, January 22, 2008

Run BASIC Podcast Interview - Part 2

As promised, part two of the Run BASIC interview with James Robertson is now online. Amongst other things, we chatted about how web development is harder than it needs to be, and about the challenges of marketing something different because people's perceptions can be hard to break through.

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

Enjoy!

-Carl

Java and BASIC - Simplicity and backwards compatibility?

Bruce Eckel and Joshua Bloch kick the can around about Java and complexity. Read about it here:

http://www.infoq.com/news/2008/01/java-evolution

I especially like this quote about Java and web development:
Web application development - this is difficult, and developing web applications with complex and underpowered technologies like JSP and JSF "is like eating soup with a fork"

I've been a Java programmer for 7 years. I've never liked the language. It always seemed to me to be much too verbose and controlling. It's amazing to me that it has been so popular, but that is more of a marketing accomplishment than anything else.

Run BASIC is a web programming system in development, and a really important part of what Scott McLaughlin and I are trying to do is to manage how the language grows. One important question to ask is how much emphasis to place on backwards compatibility as we more forward. Our goal is to create the best BASIC for the web, and it should still be simple and fun to use even as it becomes more powerful.

I invite your comments. :-)

Wednesday, January 16, 2008

Amazon's EC2 and Run BASIC?

I've been trying to figure out how to provide hosting for Run BASIC users. Someone had asked, so I suggested Amazon's EC2 system. I had read about it somewhere, and then it was recommended to me while I was being interviewed here.

The idea that I've been toying with is to charge a reasonable monthly fee like $15 for a Run BASIC user account on a VPS on EC2. A single instance of a VPS costs about $75 a month, and additional instances are created and removed as load changes.

So far things aren't looking really encouraging. Jerry Muelver has been looking into this matter, and so far it looks like a difficult matter to set up. Documentation is not easy to follow, and it just seems like a real hair puller. Check it out Jerry's story here.

Monday, January 14, 2008

Ajax and BASIC

Ajax (Asynchronous Javascript and XML) style techniques for building interactive web applications are the rage today. They are somewhat overhyped, but there is some value there.

Run BASIC already provides an exceptionally easy web programming system, but it does so with minimal special effects. There is a tiny bit of Javascript being used but almost everything is done with XHTML on the browser, and a very smart web application server.

In release v1.0 of Run BASIC the widgets (and indeed the page itself) are all objects. They are created by very simple statements. Any sort of Ajax inspired widgets for a future release of Run BASIC must not be any more complicated to use than the simple to use widgets that are already there.

Additionally, one of the most important aspects of Ajax is partial page reloading. This is important and we are eagerly planning to add this. What this will allow you the Run BASIC program to do is to reload a small part of your web app in the browser so that each user action does cause the whole page to be refreshed from the browser. This provides for smoother feeling user experience, and it also can improve performance.

So, Ajax must not complicate Run BASIC. Our design philosophy is to respect the simplicity of BASIC as much as possible. There are too many complicated programming systems out there, and the world doesn't need another one.

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

Perspective is Worth 80 IQ Points

Bill Williams sums up nicely why small is beautiful when it comes to programming tools.

http://rbblog.billdubya.net/2007/10/mindset-problem.html

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://babek.info/libertybasicfiles/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.