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).
Saturday, April 29, 2006
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.
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.
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!
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.
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
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.
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? ;-)
So what gives? An awful lot of people don't think that the new Visual Basic .Net product is Visual Basic at all. It's more of a version of C# (a Java clone, more or less) with some BASIC syntax thrown on top. It's not hard to use Google to find many articles of people who agree with this sentiment.
Here are some examples that I found in just minute:
http://www.sqlmag.com/articles/index.cfm?articleid=21050&
And from Wikipedia:
http://en.wikipedia.org/wiki/Visual_Basic_.NET#Comparative_samples
http://en.wikipedia.org/wiki/Visual_Basic_.NET#Controversy_concerning_VB.NET
If there's any dishonesty here, I claim that it's on Microsoft's part. For years people complained that Visual Basic isn't BASIC. Now people are complaining that VB.Net isn't Visual Basic. Where does it end? ;-)
Monday, March 20, 2006
Whatever happened to PEEK and POKE?
Sometimes I'm asked how to PEEK and POKE using Liberty BASIC. The short answer to this is, you can't. The long answer is more complicated.
The original home computers (like the classic Commodore 64, TRS-80, and Apple II models) were designed to be completely open to their owners. Most of the different parts of the computer like the sound, graphics, keyboard and joystick (there were no mice back then) were controlled by mapping them to different memory locations. So, the built-in commands didn't do everything you need? It was common to control the computer's equipment directly by sticking values into the memory locations that control that equipment, and reading the status back out. This was done with POKE and PEEK. This was a lot of fun, and usually useful too.
Since these early machines didn't multitask it was pretty safe to steal control of things away from the BASIC interpreter (which was a much operating system as there was). Then computers started running Windows, the Mac OS, Linux, etc. and allowed more than one program to run at a time. PEEK and POKE became problematic because if one program decided to mess with the screen for example, it might interfere with what other programs need to do their thing. Not only that, but computers today all have different kinds of hardware in them, so even if you could PEEK and POKE the exact memory locations would be different from machine to machine. So that's the bad news. :-(
The good news is that we can still have a power trip. How? Your operating system manages all the hardware for you behind operating system functions. These functions make every computer look more or less the same to the programmer. You can use these functions to do a lot of powerful things and most languages have a way to use them. For example Liberty BASIC programmers can use the CALLDLL command to make Windows API calls, which are the operating system calls of the Windows operating system. These are more complicated in general (and you can fill a whole bookshelf with information about them) than the old fashioned PEEK and POKE, but at least we aren't left without some way to pull rank on our computers. ;-)
So if you're missing the power and coolness of PEEK and POKE, why not try your hand at API calls?
Here is a useful link to get you started: http://libertybasicuniversity.com/lbnews/nl108/api.htm
The original home computers (like the classic Commodore 64, TRS-80, and Apple II models) were designed to be completely open to their owners. Most of the different parts of the computer like the sound, graphics, keyboard and joystick (there were no mice back then) were controlled by mapping them to different memory locations. So, the built-in commands didn't do everything you need? It was common to control the computer's equipment directly by sticking values into the memory locations that control that equipment, and reading the status back out. This was done with POKE and PEEK. This was a lot of fun, and usually useful too.
Since these early machines didn't multitask it was pretty safe to steal control of things away from the BASIC interpreter (which was a much operating system as there was). Then computers started running Windows, the Mac OS, Linux, etc. and allowed more than one program to run at a time. PEEK and POKE became problematic because if one program decided to mess with the screen for example, it might interfere with what other programs need to do their thing. Not only that, but computers today all have different kinds of hardware in them, so even if you could PEEK and POKE the exact memory locations would be different from machine to machine. So that's the bad news. :-(
The good news is that we can still have a power trip. How? Your operating system manages all the hardware for you behind operating system functions. These functions make every computer look more or less the same to the programmer. You can use these functions to do a lot of powerful things and most languages have a way to use them. For example Liberty BASIC programmers can use the CALLDLL command to make Windows API calls, which are the operating system calls of the Windows operating system. These are more complicated in general (and you can fill a whole bookshelf with information about them) than the old fashioned PEEK and POKE, but at least we aren't left without some way to pull rank on our computers. ;-)
So if you're missing the power and coolness of PEEK and POKE, why not try your hand at API calls?
Here is a useful link to get you started: http://libertybasicuniversity.com/lbnews/nl108/api.htm
Wednesday, March 15, 2006
Redevelopment price hike?
In a comment to a previous post Isaac Raway wrote: "I see that you note you're going to change the syntax for controlling widgets in the new basic you're working on. Awesome! This may actually make me want to switch to LB as my main platform--maybe."
I'm glad to hear this. The new LB is coming along nicely now.
Isaac continues: "However I'm a bit concerned. I've seen this sort of "redevelopment" happen before, and often times it comes with a higher price tag. One of the strong points of LB I think is that it is truly useful but very inexpensive. I think you're the kind of person who realizes that though, so I have faith you'll keep it affordable."
Well, you're right. Pricing is a marketing issue and it isn't always clear whether to raise or lower prices. I can't promise that I will never raise the price of Liberty BASIC (in fact I've done it before) but I am committed to keeping it affordable. Many times I get feedback that LB is too inexpensive and that I should raise the price, so you see this is not a simple matter to determine.
Also remember that now we have a free BASIC (http://www.justbasic.com).
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!
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.
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. :-/
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. ;-)
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++.
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. :-)
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.
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.
I'm inspired to write this because of the plight of General Motors. The world's largest auto manufacturer is losing money in droves. The reason is in their name, the first word of which is General. The problem is that there is so much competition in this world today, that being general is not a strength. If you want to get people's attention, you need to specialize.
BASIC also needs to specialize. The key ideas it needs to specialize in? Easy, simple, approachable, and fun. Does it have power? Yes. It has the kind of power that gives the average person the ability to program computers because of the four qualities I just listed. When Microsoft created Visual Basic (now officially unsupported by the way) they took BASIC out of the domain of the everyday person and tried to make a professional tool out of it. They should have called it Visual BATAP.
BATAP can never be BASIC.
Sunday, April 03, 2005
BASIC Overloaded?
One reader posted a comment to my last post on the cult of complexity. He remarked on how the OPEN statement in Liberty BASIC is used to open not only disk files, but windows and DLLs. He expressed his desire for a further extension of OPEN for managing TCP/IP sockets. The thing is, I have been planning to do this for some time, and expect to see it in Liberty BASIC v5.0 when it makes its debut.
Using a command for many different things is called "overloading" by programming language designers. So, the OPEN statement is overloaded in Liberty BASIC. This is one of the techniques I use to try and keep BASIC small. I could have added more commands. Maybe for opening a window I could have added CREATEWIN and for accessing DLLs I could have added MAPDLL or some similar name. This might have been okay, but it doesn't keep the language small. I think is crucially important to minimize growth because of the ever expanding list of things a programming language is expected to handle. If I don't fight growth, pretty soon Liberty BASIC will be unmanagable.
If you have ideas that are very close to each other (like opening a file, a window, a socket, etc.) it makes a lot of sense to overload the commands that access them. This can be taken too far, but usually I believe that it isn't taken far enough. Programming languages need to be more general.
Using a command for many different things is called "overloading" by programming language designers. So, the OPEN statement is overloaded in Liberty BASIC. This is one of the techniques I use to try and keep BASIC small. I could have added more commands. Maybe for opening a window I could have added CREATEWIN and for accessing DLLs I could have added MAPDLL or some similar name. This might have been okay, but it doesn't keep the language small. I think is crucially important to minimize growth because of the ever expanding list of things a programming language is expected to handle. If I don't fight growth, pretty soon Liberty BASIC will be unmanagable.
If you have ideas that are very close to each other (like opening a file, a window, a socket, etc.) it makes a lot of sense to overload the commands that access them. This can be taken too far, but usually I believe that it isn't taken far enough. Programming languages need to be more general.
Sunday, March 20, 2005
The cult of complexity
Just the other day I noticed that someone posted a review on Download.com which criticized Liberty BASIC for being a beginner's language. Excuse me? We are talking about BASIC aren't we? Beginner's All purpose Symbolic Instruction Code? Did I miss something?
This reminds me of a software developer I met a few years back at a developer's conference. He asked me about my product, and I gave him a demo. His reaction was "Why would anyone want to use that?" He missed the point entirely. Not everyone has spent the last decade or more of their life developing cutting edge software 40 or more hours a week. If you have to compete with other people, you may well be forced to master the latest and greatest bells and whistles. He forgets that there are scores of people who need to get something done quickly and easily.
Anyone who programmed in BASIC 20+ years ago will agree that Liberty BASIC has more bells and whistles than any BASIC did back then. I'm actually dissatisfied about that. We should be trying to make programming simpler, not more complicated. There is a certain level of sophistication which adds value, but then there is a line which get crossed where things get very murky. Does that new feature make programming simpler, or harder? It can be hard to tell. The more stuff you have to remember, the harder it is to see the forest for the trees.
Aside from getting work done (unless you're programming only for enjoyment), programming is more about becoming smarter and not about proving how smart you are.
This reminds me of a software developer I met a few years back at a developer's conference. He asked me about my product, and I gave him a demo. His reaction was "Why would anyone want to use that?" He missed the point entirely. Not everyone has spent the last decade or more of their life developing cutting edge software 40 or more hours a week. If you have to compete with other people, you may well be forced to master the latest and greatest bells and whistles. He forgets that there are scores of people who need to get something done quickly and easily.
Anyone who programmed in BASIC 20+ years ago will agree that Liberty BASIC has more bells and whistles than any BASIC did back then. I'm actually dissatisfied about that. We should be trying to make programming simpler, not more complicated. There is a certain level of sophistication which adds value, but then there is a line which get crossed where things get very murky. Does that new feature make programming simpler, or harder? It can be hard to tell. The more stuff you have to remember, the harder it is to see the forest for the trees.
Aside from getting work done (unless you're programming only for enjoyment), programming is more about becoming smarter and not about proving how smart you are.
Subscribe to:
Posts (Atom)